instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void onComplete(@NonNull final I_PP_Product_BOM productBOMRecord)
{
final Optional<I_PP_Product_BOM> previousBOMVersion = productBOMDAO.getPreviousVersion(productBOMRecord, DocStatus.Completed);
if (!previousBOMVersion.isPresent())
{
return;
}
if (!shouldUpdateExistingPPOrderCandidates(productBOM... | {
return !EmptyUtil.isEmpty(ppOrderCandidateDAO.getByProductBOMId(productBOMId))
|| !EmptyUtil.isEmpty(ppOrderDAO.getByProductBOMId(productBOMId));
}
private void updateBOMOnMatchingOrderCandidates(
@NonNull final ProductBOMId previousBOMVersionID,
@NonNull final I_PP_Product_BOM productBOMRecord)
{
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\model\interceptor\PP_Product_BOM.java | 1 |
请完成以下Java代码 | public AnnotationContainer annotations() {
return this.annotations;
}
/**
* Return the modifiers.
* @return the modifiers
*/
public int getModifiers() {
return this.modifiers;
}
/**
* Return the name.
* @return the name
*/
public String getName() {
return this.name;
}
/**
* Return the ret... | private final String name;
private String returnType;
private int modifiers;
private Object value;
private boolean initialized;
private Builder(String name) {
this.name = name;
}
/**
* Sets the modifiers.
* @param modifiers the modifiers
* @return this for method chaining
*/
public ... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\java\JavaFieldDeclaration.java | 1 |
请完成以下Java代码 | public void setAuthoritiesClaimName(String authoritiesClaimName) {
Assert.hasText(authoritiesClaimName, "authoritiesClaimName cannot be empty");
this.authoritiesClaimNames = Collections.singletonList(authoritiesClaimName);
}
private String getAuthoritiesClaimName(Jwt jwt) {
for (String claimName : this.authori... | }
return Collections.emptyList();
}
if (authorities instanceof Collection) {
return castAuthoritiesToCollection(authorities);
}
return Collections.emptyList();
}
@SuppressWarnings("unchecked")
private Collection<String> castAuthoritiesToCollection(Object authorities) {
return (Collection<String>) au... | repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\authentication\JwtGrantedAuthoritiesConverter.java | 1 |
请完成以下Java代码 | public void setRemote_Addr (String Remote_Addr)
{
set_Value (COLUMNNAME_Remote_Addr, Remote_Addr);
}
/** Get Remote Addr.
@return Remote Address
*/
public String getRemote_Addr ()
{
return (String)get_Value(COLUMNNAME_Remote_Addr);
}
/** Set Remote Host.
@param Remote_Host | Remote host Info
*/
public void setRemote_Host (String Remote_Host)
{
set_Value (COLUMNNAME_Remote_Host, Remote_Host);
}
/** Get Remote Host.
@return Remote host Info
*/
public String getRemote_Host ()
{
return (String)get_Value(COLUMNNAME_Remote_Host);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Registration.java | 1 |
请完成以下Java代码 | public ArticleRecord value1(Integer value) {
setId(value);
return this;
}
@Override
public ArticleRecord value2(String value) {
setTitle(value);
return this;
}
@Override
public ArticleRecord value3(String value) {
setDescription(value);
return th... | value3(value3);
value4(value4);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached ArticleRecord
*/
public Art... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\records\ArticleRecord.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Mono<Order> handleOrder(Order order) {
log.info("Handle order invoked with: {}", order);
return Flux.fromIterable(order.getLineItems())
.flatMap(l -> productRepository.findById(l.getProductId()))
.flatMap(p -> {
int q = order.getLineItems()
... | return Flux.fromIterable(order.getLineItems())
.flatMap(l -> productRepository.findById(l.getProductId()))
.flatMap(p -> {
int q = order.getLineItems()
.stream()
.filter(l -> l.getProductId()
.equals(p.getId()))
... | repos\tutorials-master\reactive-systems\inventory-service\src\main\java\com\baeldung\reactive\service\ProductService.java | 2 |
请完成以下Java代码 | public List<I_M_HU> getTopLevelHUs(final org.eevolution.model.I_PP_Cost_Collector cc)
{
final IHUAssignmentDAO huAssignmentDAO = Services.get(IHUAssignmentDAO.class);
return huAssignmentDAO.retrieveTopLevelHUsForModel(cc);
}
@Override
public void restoreTopLevelHUs(final I_PP_Cost_Collector costCollector)
{
... | if (Check.isEmpty(snapshotId, true))
{
throw new HUException("@NotFound@ @Snapshot_UUID@ (" + costCollector + ")");
}
final IContextAware context = InterfaceWrapperHelper.getContextAware(costCollector);
Services.get(IHUSnapshotDAO.class).restoreHUs()
.setContext(context)
.setSnapshotId(snapshotId)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\HUPPCostCollectorBL.java | 1 |
请完成以下Java代码 | private FactLine applyTo(@NonNull final FactLine factLine)
{
final FactLineMatchKey matchKey = FactLineMatchKey.ofFactLine(factLine);
//
// Remove line
final FactAcctChanges remove = linesToRemoveByKey.remove(matchKey);
if (remove != null)
{
return null; // consider line removed
}
//
// Change li... | throw new AdempiereException("Expected type `Add` but it was " + changesToAdd);
}
final FactLine factLine = fact.createLine()
.alsoAddZeroLine()
.setAccount(changesToAdd.getAccountIdNotNull())
.setAmtSource(changesToAdd.getAmtSourceDr(), changesToAdd.getAmtSourceCr())
.setAmtAcct(changesToAdd.getAm... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\factacct_userchanges\FactAcctChangesApplier.java | 1 |
请完成以下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... | return (String)get_Value(COLUMNNAME_PrivateNote);
}
/** Set Text Message.
@param TextMsg
Text Message
*/
public void setTextMsg (String TextMsg)
{
set_Value (COLUMNNAME_TextMsg, TextMsg);
}
/** Get Text Message.
@return Text Message
*/
public String getTextMsg ()
{
return (String)get_Value(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Bid.java | 1 |
请完成以下Java代码 | public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Branch getMainBranch() {
return mainBranch;
}
public void setMainBranch(Bran... | return subBranch;
}
public void setSubBranch(Branch subBranch) {
this.subBranch = subBranch;
}
public Branch getAdditionalBranch() {
return additionalBranch;
}
public void setAdditionalBranch(Branch additionalBranch) {
this.additionalBranch = additionalBranch;
}
} | repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\lazycollection\model\Employee.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Map<String, JksSslBundleProperties> getJks() {
return this.jks;
}
public Watch getWatch() {
return this.watch;
}
public static class Watch {
/**
* File watching.
*/
private final File file = new File();
public File getFile() {
return this.file;
}
public static class ... | */
private Duration quietPeriod = Duration.ofSeconds(10);
public Duration getQuietPeriod() {
return this.quietPeriod;
}
public void setQuietPeriod(Duration quietPeriod) {
this.quietPeriod = quietPeriod;
}
}
}
}
} | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ssl\SslProperties.java | 2 |
请完成以下Java代码 | final class DockerJson {
private static final JsonMapper jsonMapper = JsonMapper.builder()
.defaultLocale(Locale.ENGLISH)
.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES)
.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
.disable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES)
.build(... | JavaType javaType = jsonMapper.getTypeFactory().constructCollectionType(List.class, itemType);
return deserialize(json, javaType);
}
return json.trim().lines().map((line) -> deserialize(line, itemType)).toList();
}
/**
* Deserialize JSON to an object instance.
* @param <T> the result type
* @param json ... | repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\core\DockerJson.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class EmployeeServicesWithRepository implements EmployeeService {
@Autowired
EmployeeRepository employeeRepository;
@Override
public void save(Employee employee) {
employeeRepository.save(employee);
}
@Override
public Iterable<Employee> fetchAll() {
return employeeRep... | public void update(Employee employee) {
employeeRepository.save(employee);
}
@Override
public void delete(Integer id) {
employeeRepository.deleteById(id);
}
public Iterable<Employee> getSortedListOfEmployeesBySalary() {
throw new RuntimeException("Method not supported by C... | repos\tutorials-master\persistence-modules\spring-data-keyvalue\src\main\java\com\baeldung\spring\data\keyvalue\services\impl\EmployeeServicesWithRepository.java | 2 |
请完成以下Java代码 | public void setPayPal_PayerApprovalRequest_MailTemplate_ID (final int PayPal_PayerApprovalRequest_MailTemplate_ID)
{
if (PayPal_PayerApprovalRequest_MailTemplate_ID < 1)
set_Value (COLUMNNAME_PayPal_PayerApprovalRequest_MailTemplate_ID, null);
else
set_Value (COLUMNNAME_PayPal_PayerApprovalRequest_MailTemp... | @Override
public boolean isPayPal_Sandbox()
{
return get_ValueAsBoolean(COLUMNNAME_PayPal_Sandbox);
}
@Override
public void setPayPal_WebUrl (final @Nullable java.lang.String PayPal_WebUrl)
{
set_Value (COLUMNNAME_PayPal_WebUrl, PayPal_WebUrl);
}
@Override
public java.lang.String getPayPal_WebUrl()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Config.java | 1 |
请完成以下Java代码 | public class GolfCourse {
public static final int STANDARD_PAR_FOR_COURSE = 72;
public static final Set<Integer> VALID_PARS_FOR_HOLE =
Collections.unmodifiableSet(CollectionUtils.asSet(3, 4, 5));
@NonNull
private final String name;
private final List<Integer> parForHole = new ArrayList<>(18);
public int ge... | this.parForHole.add(indexForHole(holeNumber), par);
return this;
}
private void assertValidHoleNumber(int hole) {
Assert.isTrue(isValidHoleNumber(hole),
() -> String.format("Hole number [%d] must be 1 through 18", hole));
}
private void assertValidParForHole(int par, int hole) {
Assert.isTrue(isValidPar... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\model\GolfCourse.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Quantity getTotalQtyReceived()
{
clearLoadedData();
final I_PP_Order_BOMLine ppOrderBomLine = getCOProductLine();
if (ppOrderBomLine != null)
{
return loadingAndSavingSupportServices.getQuantities(ppOrderBomLine).getQtyIssuedOrReceived().negate();
}
return loadingAndSavingSupportServices.getQua... | private void save()
{
newSaver().saveActivityStatuses(job);
}
@NonNull
private ManufacturingJobLoaderAndSaver newSaver() {return new ManufacturingJobLoaderAndSaver(loadingAndSavingSupportServices);}
private void autoIssueForWhatWasReceived()
{
job = jobService.autoIssueWhatWasReceived(job, RawMaterialsIssue... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\receive\ReceiveGoodsCommand.java | 2 |
请完成以下Java代码 | private static int nthPadovanTermRecursiveMethodWithMemoization(int n, int[] memo) {
if (memo[n] != 0) {
return memo[n];
}
memo[n] = nthPadovanTermRecursiveMethodWithMemoization(n - 2, memo) + nthPadovanTermRecursiveMethodWithMemoization(n - 3, memo);
return memo[n];
}
... | int tempNthTerm;
for (int i = 3; i <= n; i++) {
tempNthTerm = p0 + p1;
p0 = p1;
p1 = p2;
p2 = tempNthTerm;
}
return p2;
}
public static int nthPadovanTermUsingFormula(int n) {
if (n == 0 || n == 1 || n == 2) {
return 1;... | repos\tutorials-master\core-java-modules\core-java-numbers-3\src\main\java\com\baeldung\padovan\PadovanSeriesUtils.java | 1 |
请完成以下Java代码 | public col addElement(String hashcode,Element element)
{
addElementToRegistry(hashcode,element);
return(this);
}
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
*/
... | }
/**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public col addElement(String element)
{
addElementToRegistry(element);
return(this);
}
/**
Removes an Element from the element.
@param hashcode ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\col.java | 1 |
请完成以下Java代码 | public void setMSV3_BaseUrl (java.lang.String MSV3_BaseUrl)
{
set_Value (COLUMNNAME_MSV3_BaseUrl, MSV3_BaseUrl);
}
/** Get MSV3 Base URL.
@return Beispiel: https://msv3-server:443/msv3/v2.0
*/
@Override
public java.lang.String getMSV3_BaseUrl ()
{
return (java.lang.String)get_Value(COLUMNNAME_MSV3_Base... | /**
* Version AD_Reference_ID=540904
* Reference name: MSV3_Version
*/
public static final int VERSION_AD_Reference_ID=540904;
/** 1 = 1 */
public static final String VERSION_1 = "1";
/** 2 = 2 */
public static final String VERSION_2 = "2";
/** Set Version.
@param Version
Version of the table definiti... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_Vendor_Config.java | 1 |
请完成以下Java代码 | public boolean isRunning() {
this.lock.lock();
try {
return this.running;
}
finally {
this.lock.unlock();
}
}
@Override
public int getPhase() {
return this.phase;
}
public void setPhase(int phase) {
this.phase = phase;
}
@Override
public boolean isAutoStartup() {
return this.autoStartup... | @Override
public void onCreate(@Nullable Connection connection) {
this.bindingsFailedException = null;
TopicExchange exchange = new TopicExchange("amq.rabbitmq.event");
try {
this.admin.declareQueue(this.eventQueue);
Arrays.stream(this.eventKeys).forEach(k -> {
Binding binding = BindingBuilder.bind(thi... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\core\BrokerEventListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class KafkaConfig {
@Value(value = "${spring.kafka.bootstrap-servers}")
private String bootstrapAddress;
@Value(value = "${spring.kafka.streams.state.dir}")
private String stateStoreLocation;
@Bean(name = KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME)
KafkaStreamsCo... | // configure the state location to allow tests to use clean state for every run
props.put(STATE_DIR_CONFIG, stateStoreLocation);
return new KafkaStreamsConfiguration(props);
}
@Bean
NewTopic inputTopic() {
return TopicBuilder.name("input-topic")
.partitions(1)
... | repos\tutorials-master\spring-kafka\src\main\java\com\baeldung\kafka\streams\KafkaConfig.java | 2 |
请完成以下Java代码 | protected boolean afterSave(final boolean newRecord, final boolean success)
{
updateHeader();
return success;
}
@Override
protected boolean afterDelete(final boolean success)
{
updateHeader();
return success;
}
private void updateHeader()
{
final String sql = DB.convertSqlToNative("UPDATE C_Project ... | + "(SELECT COALESCE(SUM(pl.PlannedAmt),0),COALESCE(SUM(pl.PlannedQty),0),COALESCE(SUM(pl.PlannedMarginAmt),0),"
+ " COALESCE(SUM(pl.CommittedAmt),0),COALESCE(SUM(pl.CommittedQty),0),"
+ " COALESCE(SUM(pl.InvoicedAmt),0), COALESCE(SUM(pl.InvoicedQty),0) "
+ "FROM C_ProjectLine pl "
+ "WHERE pl.C_Project_... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MProjectLine.java | 1 |
请完成以下Java代码 | public void setPid(Long pid) {
this.pid = pid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;... | }
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getSort() {
return sort;
}
public void... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsPermission.java | 1 |
请完成以下Java代码 | public String getLineReference()
{
return entry.getNtryRef();
}
@Override
@NonNull
protected String getUnstructuredRemittanceInfo(@NonNull final String delimiter)
{
return String.join(delimiter, getUnstructuredRemittanceInfoList());
}
@Override
@NonNull
protected List<String> getUnstructuredRemittanceIn... | return lineDesc;
}
@Override
@Nullable
protected String getCcy()
{
return entry.getAmt().getCcy();
}
@Override
@Nullable
protected BigDecimal getAmtValue()
{
return entry.getAmt().getValue();
}
public boolean isBatchTransaction() {return getEntryTransaction().size() > 1;}
@Override
public List<ITr... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java\de\metas\banking\camt53\wrapper\v02\BatchReportEntry2Wrapper.java | 1 |
请完成以下Java代码 | public boolean isMatching(@Nullable final HashableString other)
{
if (this == other)
{
return true;
}
if (other == null)
{
return false;
}
if (isPlain())
{
if (other.isPlain())
{
return valueEquals(other.value);
}
else
{
return hashWithSalt(other.salt).valueEquals(other.va... | }
else
{
if (other.isPlain())
{
return other.hashWithSalt(salt).valueEquals(value);
}
else
{
return valueEquals(other.value);
}
}
}
private boolean valueEquals(final String otherValue)
{
return Objects.equals(this.value, otherValue);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\hash\HashableString.java | 1 |
请完成以下Java代码 | public static PPOrderRef ofPPOrderBOMLineId(final int ppOrderId, final int ppOrderBOMLineId)
{
return ofPPOrderBOMLineId(PPOrderId.ofRepoId(ppOrderId), PPOrderBOMLineId.ofRepoId(ppOrderBOMLineId));
}
public static PPOrderRef ofPPOrderBOMLineId(@NonNull final PPOrderId ppOrderId, @NonNull final PPOrderBOMLineId pp... | public PPOrderRef withPPOrderId(@Nullable final PPOrderId ppOrderId)
{
if (PPOrderId.equals(this.ppOrderId, ppOrderId))
{
return this;
}
return toBuilder().ppOrderId(ppOrderId).build();
}
@Nullable
public static PPOrderRef withPPOrderId(@Nullable final PPOrderRef ppOrderRef, @Nullable final PPOrderId n... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\pporder\PPOrderRef.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void handleEvent(@NonNull final ShipmentScheduleCreatedEvent event)
{
final DemandDetailsQuery demandDetailsQuery = DemandDetailsQuery.forDocumentLine(event.getDocumentLineDescriptor());
final CandidatesQuery candidatesQuery = CandidatesQuery
.builder()
.type(CandidateType.DEMAND)
.businessCase... | .minMaxDescriptor(event.getMinMaxDescriptor())
.type(CandidateType.DEMAND)
.businessCase(CandidateBusinessCase.SHIPMENT)
.businessCaseDetail(demandDetail);
final Candidate existingCandidate = candidateRepository.retrieveLatestMatchOrNull(candidatesQuery);
if (existingCandidate != null)
{
candidate... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\shipmentschedule\ShipmentScheduleCreatedHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getDetail() {
return detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
public String getAttach() {
return attac... | this.totalFee = totalFee;
}
public String getSpbillCreateIp() {
return spbillCreateIp;
}
public void setSpbillCreateIp(String spbillCreateIp) {
this.spbillCreateIp = spbillCreateIp;
}
public String getTimeStart() {
return timeStart;
}
public void setTimeStart(... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\entity\weixinpay\WeiXinPrePay.java | 2 |
请完成以下Java代码 | private static ImmutableMap<WindowId, ImmutableMap<ViewProfileId, SqlViewCustomizer>> makeViewCustomizersMap(final ImmutableList<SqlViewCustomizer> viewCustomizers)
{
final Map<WindowId, ImmutableMap<ViewProfileId, SqlViewCustomizer>> map = viewCustomizers
.stream()
.sorted(ORDERED_COMPARATOR)
.collect(C... | if (viewCustomizersByProfileId == null)
{
return null;
}
return viewCustomizersByProfileId.get(profileId);
}
public void forEachWindowIdAndProfileId(@NonNull final BiConsumer<WindowId, ViewProfileId> consumer)
{
viewCustomizers.forEach(viewCustomizer -> consumer.accept(viewCustomizer.getWindowId(), view... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\SqlViewCustomizerMap.java | 1 |
请完成以下Java代码 | public int getC_BPartner_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set C_Customer_Retention_ID.
@param C_Customer_Retention_ID C_Customer_Retention_ID */
@Override
public void setC_Customer_Retention_ID (int C_Customer_R... | public static final int CUSTOMERRETENTION_AD_Reference_ID=540937;
/** Neukunde = N */
public static final String CUSTOMERRETENTION_Neukunde = "N";
/** Stammkunde = S */
public static final String CUSTOMERRETENTION_Stammkunde = "S";
/** Set Customer Retention.
@param CustomerRetention Customer Retention */
@Ov... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Customer_Retention.java | 1 |
请完成以下Java代码 | public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BPMNErrorImpl that = (BPMNErrorImpl) o;
return (
Objects.equals(getElementId(), that.getElementId()) &&
... | ", activityType='" +
getActivityType() +
'\'' +
", elementId='" +
getElementId() +
'\'' +
", errorId='" +
getErrorId() +
'\'' +
", errorCode='" +
getErrorCode() +
'\'' +
'}'
... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\BPMNErrorImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
CsrfToken csrf = (CsrfToken) request.getAttribute(CsrfToken.class
.getName());
if (csrf != null) {
Cookie cookie = WebUtils.getCookie(req... | * Angular sends the CSRF token in a custom header named "X-XSRF-TOKEN"
* rather than the default "X-CSRF-TOKEN" that Spring security expects.
* Hence we are now telling Spring security to expect the token in the
* "X-XSRF-TOKEN" header.<br><br>
*
* This customization is added to the <code>csrf()</code> filte... | repos\spring-boot-microservices-master\api-gateway\src\main\java\com\rohitghatol\microservice\gateway\config\OAuthConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setWithoutSource(Boolean withoutSource) {
this.withoutSource = withoutSource;
}
@CamundaQueryParam(value = "before", converter = DateConverter.class)
public void setDeploymentBefore(Date deploymentBefore) {
this.before = deploymentBefore;
}
@CamundaQueryParam(value = "after", converter =... | query.deploymentSource(source);
}
if (before != null) {
query.deploymentBefore(before);
}
if (after != null) {
query.deploymentAfter(after);
}
if (tenantIds != null && !tenantIds.isEmpty()) {
query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()]));
}
if (TRUE.... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\DeploymentQueryDto.java | 2 |
请完成以下Java代码 | public Map<String, Object> getVariables() {
return variables;
}
@Override
public Map<String, Object> getTransientVariables() {
return transientVariables;
}
@Override
public String getTenantId() {
return tenantId;
}
@Override
public String getOwner() {
... | @Override
public String getCallbackId() {
return this.callbackId;
}
@Override
public String getCallbackType() {
return this.callbackType;
}
@Override
public String getReferenceId() {
return referenceId;
}
@Override
public String getReferenceType() {
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceBuilderImpl.java | 1 |
请完成以下Java代码 | private void sendEventObj(final Topic topic, final Object eventObj)
{
final Event event = toEvent(eventObj);
Services.get(ITrxManager.class)
.getCurrentTrxListenerManagerOrAutoCommit()
.newEventListener(TrxEventTiming.AFTER_COMMIT)
.invokeMethodJustOnce(true)
.registerHandlingMethod(trx -> sendEve... | public static InOutChangedEvent extractInOutChangedEvent(@NonNull final Event event)
{
return extractEvent(event, InOutChangedEvent.class);
}
public static InvoiceChangedEvent extractInvoiceChangedEvent(@NonNull final Event event)
{
return extractEvent(event, InvoiceChangedEvent.class);
}
public static <T> ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\BPartnerProductStatsEventSender.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ShipmentScheduleQuery
{
private static final ShipmentScheduleQuery ANY = builder().build();
@Builder.Default
@NonNull QueryLimit limit = QueryLimit.NO_LIMIT;
@Nullable IQueryFilter<I_M_ShipmentSchedule> queryFilter;
@NonNull @Singular ImmutableSet<ShipmentScheduleId> shipmentScheduleIds;
@Nullable ... | @Builder.Default boolean includeWithQtyToDeliverZero = true;
@Builder.Default boolean includeInvalid = true;
@Builder.Default boolean includeProcessed = true;
boolean fromCompleteOrderOrNullOrder;
boolean orderByOrderId;
boolean onlyNonZeroReservedQty;
@Nullable LocalDate preparationDate;
/**
* Only export a ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\ShipmentScheduleQuery.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setResetExpiredJobEnabled(boolean isResetExpiredJobEnabled) {
configuration.setResetExpiredJobEnabled(isResetExpiredJobEnabled);
}
public Thread getTimerJobAcquisitionThread() {
return timerJobAcquisitionThread;
}
public void setTimerJobAcquisitionThread(Thread timerJobAcqu... | public void setUnlockOwnedJobs(boolean unlockOwnedJobs) {
configuration.setUnlockOwnedJobs(unlockOwnedJobs);
}
@Override
public AsyncTaskExecutor getTaskExecutor() {
return taskExecutor;
}
@Override
public void setTaskExecutor(AsyncTaskExecutor taskExecutor) {
this.task... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\DefaultAsyncJobExecutor.java | 2 |
请完成以下Java代码 | public Account verify(String id, Credential credential) {
Account account = getAccount(id);
if (account != null && verifyCredential(account, credential)) {
return account;
}
return null;
}
private boolean verifyCredential(Account account, Credential credential) {
... | @Override
public Principal getPrincipal() {
return principal;
}
@Override
public Set<String> getRoles() {
return Collections.emptySet();
}
};
}
return null;
}
} | repos\tutorials-master\server-modules\undertow\src\main\java\com\baeldung\undertow\secure\CustomIdentityManager.java | 1 |
请完成以下Java代码 | abstract class AbstractPermissions<PermissionType extends Permission> implements Permissions<PermissionType>
{
/** {@link Permission}s indexed by {@link Permission#getResource()} */
private final ImmutableMap<Resource, PermissionType> permissions;
public AbstractPermissions(final PermissionsBuilder<PermissionType, ... | protected PermissionType noPermission()
{
return null;
}
@Override
public final Optional<PermissionType> getPermissionIfExists(final Resource resource)
{
return Optional.fromNullable(permissions.get(resource));
}
@Override
public final PermissionType getPermissionOrDefault(final Resource resource)
{
//... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\AbstractPermissions.java | 1 |
请完成以下Java代码 | public class ExecutionVariableSnapshotObserver implements ExecutionObserver {
/**
* The variables which are observed during the execution.
*/
protected VariableMap variableSnapshot;
protected ExecutionEntity execution;
protected boolean localVariables = true;
protected boolean deserializeValues = fal... | public void onClear(ExecutionEntity execution) {
if (variableSnapshot == null) {
variableSnapshot = getVariables(this.localVariables);
}
}
public VariableMap getVariables() {
if (variableSnapshot == null) {
return getVariables(this.localVariables);
} else {
return variableSnapshot... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ExecutionVariableSnapshotObserver.java | 1 |
请完成以下Java代码 | public int getNbest_()
{
return nbest_;
}
public void setNbest_(int nbest_)
{
this.nbest_ = nbest_;
}
public int getVlevel_()
{
return vlevel_;
} | public void setVlevel_(int vlevel_)
{
this.vlevel_ = vlevel_;
}
public DecoderFeatureIndex getFeatureIndex_()
{
return featureIndex_;
}
public void setFeatureIndex_(DecoderFeatureIndex featureIndex_)
{
this.featureIndex_ = featureIndex_;
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\ModelImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<Task> list() {
cachedCandidateGroups = null;
return super.list();
}
@Override
public List<Task> listPage(int firstResult, int maxResults) {
cachedCandidateGroups = null;
return super.listPage(firstResult, maxResults);
}
@Override
public long count() ... | }
public List<List<String>> getSafeInvolvedGroups() {
return safeInvolvedGroups;
}
public void setSafeInvolvedGroups(List<List<String>> safeInvolvedGroups) {
this.safeInvolvedGroups = safeInvolvedGroups;
}
public List<List<String>> getSafeScopeIds() {
return safeScopeIds;
... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\TaskQueryImpl.java | 2 |
请完成以下Java代码 | public void setDIM_Dimension_Spec_ID (int DIM_Dimension_Spec_ID)
{
if (DIM_Dimension_Spec_ID < 1)
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_ID, null);
else
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_ID, Integer.valueOf(DIM_Dimension_Spec_ID));
}
/** Get Dimensionsspezifikation.
@return Dime... | /** Set Merkmal.
@param M_Attribute_ID
Produkt-Merkmal
*/
@Override
public void setM_Attribute_ID (int M_Attribute_ID)
{
if (M_Attribute_ID < 1)
set_Value (COLUMNNAME_M_Attribute_ID, null);
else
set_Value (COLUMNNAME_M_Attribute_ID, Integer.valueOf(M_Attribute_ID));
}
/** Get Merkmal.
@retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Spec_Attribute.java | 1 |
请完成以下Java代码 | public void deleteApiKey(TenantId tenantId, ApiKey apiKey, boolean force) {
UUID apiKeyId = apiKey.getUuidId();
validateId(apiKeyId, id -> INCORRECT_API_KEY_ID + id);
apiKeyDao.removeById(tenantId, apiKeyId);
publishEvictEvent(new ApiKeyEvictEvent(apiKey.getValue()));
}
@Overrid... | }
@Override
public ApiKey findApiKeyByValue(String value) {
log.trace("Executing findApiKeyByValue [{}]", value);
var cacheKey = ApiKeyCacheKey.of(value);
return cache.getAndPutInTransaction(cacheKey, () -> apiKeyDao.findByValue(value), true);
}
private String generateApiKeySec... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\pat\ApiKeyServiceImpl.java | 1 |
请完成以下Java代码 | public boolean isFollowUpNullAccepted() {
return followUpNullAccepted;
}
@Override
public TaskQuery taskNameNotEqual(String name) {
this.nameNotEqual = name;
return this;
}
@Override
public TaskQuery taskNameNotLike(String nameNotLike) {
ensureNotNull("Task nameNotLike", nameNotLike);
... | queries.add(orQuery);
return orQuery;
}
@Override
public TaskQuery endOr() {
if (!queries.isEmpty() && this != queries.get(queries.size()-1)) {
throw new ProcessEngineException("Invalid query usage: cannot set endOr() before or()");
}
return queries.get(0);
}
@Override
public TaskQu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\TaskQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
clients.inMemory()
.withClient("app-a")
.secret(passwordEncoder.encode("app-a-1234"))
.authorizedGrantTypes("refresh_token","authorization_code")
.accessTokenValidityS... | .redirectUris("http://127.0.0.1:9091/app2/login");
}
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) {
endpoints.tokenStore(jwtTokenStore())
.accessTokenConverter(jwtAccessTokenConverter())
.userDetailsService(userDetailService);
... | repos\SpringAll-master\66.Spring-Security-OAuth2-SSO\sso-server\src\main\java\cc\mrbird\sso\server\config\SsoAuthorizationServerConfig.java | 2 |
请完成以下Java代码 | public java.lang.String getDescription()
{
return get_ValueAsString(COLUMNNAME_Description);
}
@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
pu... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Price);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQty (final BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
@Override
public BigDecimal getQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrderLine_Detail.java | 1 |
请完成以下Java代码 | public void unclose(final I_PP_Order_BOMLine line)
{
changeQuantities(line, OrderBOMLineQuantities::unclose);
orderBOMsRepo.save(line);
}
@Override
public boolean isSomethingReported(@NonNull final I_PP_Order ppOrder)
{
if (getQuantities(ppOrder).isSomethingReported())
{
return true;
}
final PPOrd... | public void save(final I_PP_Order_BOMLine orderBOMLine)
{
orderBOMsRepo.save(orderBOMLine);
}
@Override
public Set<ProductId> getProductIdsToIssue(final PPOrderId ppOrderId)
{
return getOrderBOMLines(ppOrderId, I_PP_Order_BOMLine.class)
.stream()
.filter(bomLine -> BOMComponentType.ofNullableCodeOrCom... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\impl\PPOrderBOMBL.java | 1 |
请完成以下Java代码 | public void add (Timestamp DueDate, int daysDue, BigDecimal invoicedAmt, BigDecimal openAmt)
{
if (invoicedAmt == null)
invoicedAmt = Env.ZERO;
setInvoicedAmt(getInvoicedAmt().add(invoicedAmt));
if (openAmt == null)
openAmt = Env.ZERO;
setOpenAmt(getOpenAmt().add(openAmt));
// Days Due
m_noItems++;
... | else // Due = positive (> 1)
{
setPastDueAmt (getPastDueAmt().add(amt));
if (daysDue <= 7)
setPastDue1_7 (getPastDue1_7().add(amt));
if (daysDue <= 30)
setPastDue1_30 (getPastDue1_30().add(amt));
if (daysDue >= 8 && daysDue <= 30)
setPastDue8_30 (getPastDue8_30().add(amt));
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAging.java | 1 |
请完成以下Java代码 | public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Number of Months.
@param NoMonths Number of Mon... | }
/** RecognitionFrequency AD_Reference_ID=196 */
public static final int RECOGNITIONFREQUENCY_AD_Reference_ID=196;
/** Month = M */
public static final String RECOGNITIONFREQUENCY_Month = "M";
/** Quarter = Q */
public static final String RECOGNITIONFREQUENCY_Quarter = "Q";
/** Year = Y */
public static final... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RevenueRecognition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SessionDetailsFilter extends OncePerRequestFilter {
static final String UNKNOWN = "Unknown";
private DatabaseReader reader;
@Autowired
public SessionDetailsFilter(DatabaseReader reader) {
this.reader = reader;
}
// tag::dofilterinternal[]
@Override
public void doFilterInternal(HttpServletRequ... | }
else if (cityName == null) {
return countryName;
}
else if (countryName == null) {
return cityName;
}
return cityName + ", " + countryName;
}
catch (Exception ex) {
return UNKNOWN;
}
}
private String getRemoteAddress(HttpServletRequest request) {
String remoteAddr = request.getHe... | repos\spring-session-main\spring-session-samples\spring-session-sample-boot-findbyusername\src\main\java\sample\session\SessionDetailsFilter.java | 2 |
请完成以下Java代码 | public class ResultItemWrapper<ValueType> implements ResultItem
{
private final ValueType value;
public ResultItemWrapper(final ValueType value)
{
super();
Check.assumeNotNull(value, "value not null");
this.value = value;
}
public final ValueType getValue()
{
return value;
}
@Override
public String ... | .toHashcode();
}
@Override
public boolean equals(Object obj)
{
if (this == obj)
{
return true;
}
final ResultItemWrapper<ValueType> other = EqualsBuilder.getOther(this, obj);
if (other == null)
{
return false;
}
return new EqualsBuilder()
.append(this.value, other.value)
.isEqual();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\swing\autocomplete\ResultItemWrapper.java | 1 |
请完成以下Java代码 | public ITrxItemExecutorBuilder<IT, RT> setContext(final ITrxItemProcessorContext processorCtx)
{
this._processorCtx = processorCtx;
this._ctx = null;
this._trxName = null;
return this;
}
@Override
public ITrxItemExecutorBuilder<IT, RT> setProcessor(final ITrxItemProcessor<IT, RT> processor)
{
this._proc... | @Override
public ITrxItemExecutorBuilder<IT, RT> setItemsPerBatch(final int itemsPerBatch)
{
if (itemsPerBatch == Integer.MAX_VALUE)
{
this.itemsPerBatch = null;
}
else
{
this.itemsPerBatch = itemsPerBatch;
}
return this;
}
@Override
public ITrxItemExecutorBuilder<IT, RT> setUseTrxSavepoints(f... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\processor\api\impl\TrxItemExecutorBuilder.java | 1 |
请完成以下Java代码 | public int compare(Map.Entry<K, Float> o1, Map.Entry<K, Float> o2)
{
return o1.getValue().compareTo(o2.getValue());
}
});
for (Map.Entry<K, Vector> entry : storage.entrySet())
{
if (entry.getKey().equals(key))
{
con... | catch (Exception e)
{
return Collections.emptyList();
}
}
/**
* 查询抽象文本对应的向量。此方法应当保证返回单位向量。
*
* @param query
* @return
*/
public abstract Vector query(String query);
/**
* 模型中的词向量总数(词表大小)
*
* @return
*/
public int size()
{... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\AbstractVectorModel.java | 1 |
请完成以下Java代码 | public IView createView(@NonNull final CreateViewRequest request)
{
final StockDetailsRowsData stockDetailsRowData = createStockDetailsRowData(request);
return new StockDetailsView(
request.getViewId(),
request.getParentViewId(),
stockDetailsRowData,
ImmutableDocumentFilterDescriptorsProvider.of(c... | }
final Stream<HUStockInfo> huStockInfos = huStockInfoRepository.getByQuery(query.build());
return StockDetailsRowsData.of(huStockInfos);
}
@Override
public ViewLayout getViewLayout(
@NonNull final WindowId windowId,
@NonNull final JSONViewDataType viewDataType,
final ViewProfileId profileId)
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\stockdetails\StockDetailsViewFactory.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8088
spring:
redis:
database: 0
host: 127.0.0.1
port: 6379
password: 123456
lettuce:
pool:
min-idle: 0
max-active | : 8
max-idle: 8
max-wait: -1ms
connect-timeout: 30000ms | repos\springboot-demo-master\redis\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public XMLGregorianCalendar getRequestDate() {
return requestDate;
}
/**
* Sets the value of the requestDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setRequestDate(XMLGregorianCalendar value) {
... | return requestId;
}
/**
* Sets the value of the requestId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRequestId(String value) {
this.requestId = value;
}
} | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\CreditType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TaskConfiguration extends ResourceServerConfigurerAdapter {
/**
* Provide security so that endpoints are only served if the request is
* already authenticated.
*/
@Override
public void configure(HttpSecurity http) throws Exception {
// @formatter:off
http.requestMatchers()
.antMatchers("/*... | /**
* Id of the resource that you are letting the client have access to.
* Supposing you have another api ("say api2"), then you can customize the
* access within resource server to define what api is for what resource id.
* <br>
* <br>
*
* So suppose you have 2 APIs, then you can define 2 resource serve... | repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\config\TaskConfiguration.java | 2 |
请完成以下Java代码 | protected Class<DashboardEntity> getEntityClass() {
return DashboardEntity.class;
}
@Override
protected JpaRepository<DashboardEntity, UUID> getRepository() {
return dashboardRepository;
}
@Override
public Long countByTenantId(TenantId tenantId) {
return dashboardReposi... | }
@Override
public PageData<DashboardId> findAllIds(PageLink pageLink) {
return DaoUtil.pageToPageData(dashboardRepository.findAllIds(DaoUtil.toPageable(pageLink)).map(DashboardId::new));
}
@Override
public PageData<Dashboard> findAllByTenantId(TenantId tenantId, PageLink pageLink) {
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\dashboard\JpaDashboardDao.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class User
{
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Integer id;
private String name;
public User()
{
}
public User(Integer id, String name)
{
this.id = id;
this.name = name;
}
public Integer getId()
{
return id; | }
public void setId(Integer id)
{
this.id = id;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
} | repos\Spring-Boot-Advanced-Projects-main\springboot2-webapp-jsp\src\main\java\net\alanbinu\springboot2\springboot2webappjsp\domain\User.java | 2 |
请完成以下Java代码 | private DocumentFilterDescriptor createEmptyFilterDescriptor()
{
return ProductFilterUtil.createFilterDescriptor();
}
private StockDetailsRowsData createStockDetailsRowData(@NonNull final CreateViewRequest request)
{
final DocumentFilterList filters = request.getStickyFilters();
final HUStockInfoQueryBuilde... | singleQuery.attributeValue(AttributeValue.NOT_EMPTY);
}
query.singleQuery(singleQuery.build());
}
final Stream<HUStockInfo> huStockInfos = huStockInfoRepository.getByQuery(query.build());
return StockDetailsRowsData.of(huStockInfos);
}
@Override
public ViewLayout getViewLayout(
@NonNull final Windo... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\stockdetails\StockDetailsViewFactory.java | 1 |
请完成以下Java代码 | public boolean isEnableProcessDefinitionInfoCache() {
return enableProcessDefinitionInfoCache;
}
public ProcessEngineConfiguration setEnableProcessDefinitionInfoCache(boolean enableProcessDefinitionInfoCache) {
this.enableProcessDefinitionInfoCache = enableProcessDefinitionInfoCache;
re... | }
public ProcessEngineConfiguration setCleanInstancesEndedAfter(Duration cleanInstancesEndedAfter) {
this.cleanInstancesEndedAfter = cleanInstancesEndedAfter;
return this;
}
public int getCleanInstancesBatchSize() {
return cleanInstancesBatchSize;
}
public ProcessEngineCon... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\ProcessEngineConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public StaxEventItemWriter<Transaction> itemWriter(Marshaller marshaller, @Value("#{stepExecutionContext[opFileName]}") String filename) {
StaxEventItemWriter<Transaction> itemWriter = new StaxEventItemWriter<>();
itemWriter.setMarshaller(marshaller);
itemWriter.setRootTagName("transactionRecord... | // it would have been better to have a specific one
factory.afterPropertiesSet();
return factory.getObject();
}
@Bean(name = "dataSource")
public DataSource dataSource() {
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
return builder.setType(EmbeddedDatabas... | repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batch\partitioner\SpringBatchPartitionConfig.java | 2 |
请完成以下Java代码 | public class VariableUpdatedListenerDelegate implements ActivitiEventListener {
private final List<VariableEventListener<VariableUpdatedEvent>> listeners;
private final ToVariableUpdatedConverter converter;
private final VariableEventFilter variableEventFilter;
public VariableUpdatedListenerDelegate... | .from(internalEvent)
.ifPresent(convertedEvent -> {
if (listeners != null) {
for (VariableEventListener<VariableUpdatedEvent> listener : listeners) {
listener.onEvent(convertedEvent);
}
... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-runtime-shared-impl\src\main\java\org\activiti\runtime\api\event\internal\VariableUpdatedListenerDelegate.java | 1 |
请完成以下Java代码 | public void onIsCompanyFlagChanged(@NonNull final I_C_BPartner_QuickInput record)
{
bpartnerQuickInputService.updateNameAndGreetingNoSave(record);
}
@CalloutMethod(columnNames = I_C_BPartner_QuickInput.COLUMNNAME_C_Location_ID)
public void onLocationChanged(@NonNull final I_C_BPartner_QuickInput record)
{
fin... | {
final LocationId locationId = LocationId.ofRepoIdOrNull(record.getC_Location_ID());
if (locationId == null)
{
return null;
}
final I_C_Location locationRecord = locationDAO.getById(locationId);
final PostalId postalId = PostalId.ofRepoIdOrNull(locationRecord.getC_Postal_ID());
if (postalId == null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\quick_input\callout\C_BPartner_QuickInput.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Void execute(CommandContext commandContext) {
JobQueryImpl jobQuery = new JobQueryImpl(commandContext, jobServiceConfiguration);
jobQuery.lockOwner(lockOwner);
// The tenantId is only used if it has been explicitly set
if (tenantId != null) {
if (!tenantId.isEmpty()) ... | * Not logging the exception. The engine is shutting down, so not much can be done at this point.
*
* Furthermore: some exceptions can be expected here: if the job was picked up and put in the queue when
* the shutdown was triggered, the job can still be executed as the... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\UnacquireOwnedJobsCmd.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DocTypePrintOptionsRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final CCache<Integer, DocTypePrintOptionsMap> cache = CCache.<Integer, DocTypePrintOptionsMap>builder()
.tableName(I_C_DocType_PrintOptions.Table_Name)
.build();
@NonNull
public DocumentPrintO... | @Value(staticConstructor = "of")
private static class DocTypePrintOptionsKey
{
@NonNull
DocTypeId docTypeId;
@Nullable
DocumentReportFlavor flavor;
}
private static class DocTypePrintOptionsMap
{
public static final DocTypePrintOptionsMap EMPTY = new DocTypePrintOptionsMap(ImmutableMap.of());
private... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\DocTypePrintOptionsRepository.java | 2 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.add("size", tableInfoByTableName.size())
.toString();
}
@Nullable
public TableInfo getTableInfoOrNull(final String tableName)
{
final TableNameKey tableNameKey = TableNameKey.of(tableName);
return tableInfoByTableName.get(... | {
return tableInfo.getTableName();
}
//noinspection ConstantConditions
final I_AD_Table adTable = POJOLookupMap.get().lookup("AD_Table", adTableId.getRepoId());
if (adTable != null)
{
final String tableName = adTable.getTableName();
if (Check.isBlank(tableName))
{
throw new Adempier... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\api\impl\TableIdsCache.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WebSessionServerSecurityContextRepository implements ServerSecurityContextRepository {
private static final Log logger = LogFactory.getLog(WebSessionServerSecurityContextRepository.class);
/**
* The default session attribute name to save and load the {@link SecurityContext}
*/
public static final ... | this.cacheSecurityContext = cacheSecurityContext;
}
@Override
public Mono<Void> save(ServerWebExchange exchange, @Nullable SecurityContext context) {
return exchange.getSession().doOnNext((session) -> {
if (context == null) {
session.getAttributes().remove(this.springSecurityContextAttrName);
logger.de... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\context\WebSessionServerSecurityContextRepository.java | 2 |
请完成以下Java代码 | public class BooleanFormType extends SimpleFormFieldType {
public final static String TYPE_NAME = "boolean";
public String getName() {
return TYPE_NAME;
}
public TypedValue convertValue(TypedValue propertyValue) {
if(propertyValue instanceof BooleanValue) {
return propertyValue;
}
else ... | }
public String convertModelValueToFormValue(Object modelValue) {
if (modelValue==null) {
return null;
}
if(Boolean.class.isAssignableFrom(modelValue.getClass())
|| boolean.class.isAssignableFrom(modelValue.getClass())) {
return modelValue.toString();
}
throw new Process... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\type\BooleanFormType.java | 1 |
请完成以下Java代码 | /* package */final class SwingProcessExecutionListener implements IProcessExecutionListener
{
public static final IProcessExecutionListener of(final IProcessExecutionListener delegate)
{
if (delegate instanceof SwingProcessExecutionListener)
{
return delegate;
}
return new SwingProcessExecutionListener(del... | invokeInEDT(() -> delegate.lockUI(pi));
}
@Override
public void unlockUI(final ProcessInfo pi)
{
invokeInEDT(() -> delegate.unlockUI(pi));
}
private final void invokeInEDT(final Runnable runnable)
{
if (SwingUtilities.isEventDispatchThread())
{
runnable.run();
}
else
{
SwingUtilities.invokeLa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\process\ui\SwingProcessExecutionListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DocumentSalesRepDescriptorFactory
{
public DocumentSalesRepDescriptor forDocumentRecord(@NonNull final I_C_Invoice invoiceRecord)
{
final Customer customer = Customer.ofOrNull(BPartnerId.ofRepoIdOrNull(invoiceRecord.getC_BPartner_ID()));
final Beneficiary salesRep = Beneficiary.ofOrNull(BPartnerId.of... | return new OrderRecordSalesRepDescriptor(
orderRecord,
OrgId.ofRepoId(orderRecord.getAD_Org_ID()),
SOTrx.ofBoolean(orderRecord.isSOTrx()),
customer,
salesRep,
orderRecord.getSalesPartnerCode(),
orderRecord.isSalesPartnerRequired());
}
private Customer extractEffectiveBillPartnerId(@NonNul... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\salesrep\DocumentSalesRepDescriptorFactory.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
} | LowCodeUrlsEnum(String url, String title) {
this.url = url;
this.title = title;
}
/**
* 根据code获取可用的数量
*
* @return
*/
public static List<String> getLowCodeInterceptUrls() {
return Arrays.stream(LowCodeUrlsEnum.values()).map(LowCodeUrlsEnum::getUrl).collect(Collect... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\firewall\interceptor\enums\LowCodeUrlsEnum.java | 2 |
请完成以下Java代码 | public String getColumnName()
{
return m_columnName;
} // getColumnName
/**
* Get Display Type
* @return display type
*/
public int getDisplayType()
{
return m_displayType;
} // getDisplayType
/**
* Get Alias Name
* @return alias column name
*/
public String getAlias()
{
return m_alias;... | {
StringBuffer sb = new StringBuffer("PrintDataColumn[");
sb.append("ID=").append(m_AD_Column_ID)
.append("-").append(m_columnName);
if (hasAlias())
sb.append("(").append(m_alias).append(")");
sb.append(",DisplayType=").append(m_displayType)
.append(",Size=").append(m_columnSize)
.append("]");
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\PrintDataColumn.java | 1 |
请完成以下Java代码 | public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@JsonIgnore
public Collection<EventPayload> getHeaders() {
... | }
}
public void addPayload(String name, String type) {
EventPayload eventPayload = payload.get(name);
if (eventPayload != null) {
eventPayload.setType(type);
} else {
payload.put(name, new EventPayload(name, type));
}
}
public void addPayload(Eve... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\EventModel.java | 1 |
请完成以下Java代码 | private void onRecordCopied(@NonNull final PO to, @NonNull final PO from, @NonNull final CopyTemplate template)
{
if (InterfaceWrapperHelper.isInstanceOf(to, I_C_OrderLine.class)
&& InterfaceWrapperHelper.isInstanceOf(from, I_C_OrderLine.class))
{
final I_C_OrderLine newOrderLine = InterfaceWrapperHelper.cr... | .first();
Check.assumeNotNull(candidate, "Could not find a Purchase candidate for line C_PurchaseCandidate_ID {}", cPurchaseCandidateId);
candidate.setProcessed(true);
InterfaceWrapperHelper.save(candidate);
}
private void completePurchaseOrderIfNeeded(final I_C_Order newOrder)
{
if (completeIt)
{
docu... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\command\CreatePurchaseOrderFromRequisitionCommand.java | 1 |
请完成以下Java代码 | public class SimplifiedToTaiwanChineseDictionary extends BaseChineseDictionary
{
static AhoCorasickDoubleArrayTrie<String> trie = new AhoCorasickDoubleArrayTrie<String>();
static
{
long start = System.currentTimeMillis();
String datPath = HanLP.Config.tcDictionaryRoot + "s2tw";
if (!... | trie.build(s2t);
saveDat(datPath, trie, s2t.entrySet());
}
logger.info("简体转台湾繁体词典加载成功,耗时" + (System.currentTimeMillis() - start) + "ms");
}
public static String convertToTraditionalTaiwanChinese(String simplifiedChineseString)
{
return segLongest(simplifiedChineseString.... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\ts\SimplifiedToTaiwanChineseDictionary.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void cleanupForComparison(Device e) {
super.cleanupForComparison(e);
if (e.getCustomerId() != null && e.getCustomerId().isNullUid()) {
e.setCustomerId(null);
}
}
@Override
protected Device saveOrUpdate(EntitiesImportCtx ctx, Device device, DeviceExportData expo... | if (credentials != null && ctx.isSaveCredentials()) {
var existing = credentialsService.findDeviceCredentialsByDeviceId(ctx.getTenantId(), prepared.getId());
credentials.setId(existing.getId());
credentials.setDeviceId(prepared.getId());
if (!existing.equals(credentials))... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\DeviceImportService.java | 2 |
请完成以下Java代码 | protected void beforeSessionRepositoryFilter(ServletContext servletContext) {
}
/**
* Invoked after the springSessionRepositoryFilter is added.
* @param servletContext the {@link ServletContext}
*/
protected void afterSessionRepositoryFilter(ServletContext servletContext) {
}
/**
* Get the {@link Dispa... | */
protected EnumSet<DispatcherType> getSessionDispatcherTypes() {
return EnumSet.of(DispatcherType.REQUEST, DispatcherType.ERROR, DispatcherType.ASYNC);
}
/**
* Determine if the springSessionRepositoryFilter should be marked as supporting
* asynch. Default is true.
* @return true if springSessionRepository... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\context\AbstractHttpSessionApplicationInitializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Binder getBinder() {
Binder binder = this.binder;
if (binder == null) {
binder = this.contributors.getBinder(this.activationContext);
this.binder = binder;
}
return binder;
}
@Override
public @Nullable ConfigDataResource getParent() {
return this.contributor.getResource();
}
@O... | }
/**
* Binder options that can be used with
* {@link ConfigDataEnvironmentContributors#getBinder(ConfigDataActivationContext, BinderOption...)}.
*/
enum BinderOption {
/**
* Throw an exception if an inactive contributor contains a bound value.
*/
FAIL_ON_BIND_TO_INACTIVE_SOURCE
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataEnvironmentContributors.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CommonResult create(@RequestBody PmsProductAttributeParam productAttributeParam) {
int count = productAttributeService.create(productAttributeParam);
if (count > 0) {
return CommonResult.success(count);
} else {
return CommonResult.failed();
}
}
@A... | @ApiOperation("批量删除商品属性")
@RequestMapping(value = "/delete", method = RequestMethod.POST)
@ResponseBody
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
int count = productAttributeService.delete(ids);
if (count > 0) {
return CommonResult.success(count);
... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\PmsProductAttributeController.java | 2 |
请完成以下Java代码 | public class DgsClientUsage {
public void sendSingleQuery() {
// tag::sendSingleQuery[]
HttpGraphQlClient client = HttpGraphQlClient.create(WebClient.create("https://example.org/graphql"));
DgsGraphQlClient dgsClient = DgsGraphQlClient.create(client); // <1>
List<Book> books = dgsClient.request(BookByIdGraph... | .request(BookByIdGraphQLQuery.newRequest().id("42").build()) // <2>
.queryAlias("firstBook") // <3>
.projection(new BooksProjectionRoot<>().id().name())
.request(BookByIdGraphQLQuery.newRequest().id("53").build()) // <4>
.queryAlias("secondBook")
.projection(new BooksProjectionRoot<>().id().name())... | repos\spring-graphql-main\spring-graphql-docs\src\main\java\org\springframework\graphql\docs\client\dgsgraphqlclient\DgsClientUsage.java | 1 |
请完成以下Java代码 | public void setM_Product_Category_Parent(org.compiere.model.I_M_Product_Category M_Product_Category_Parent)
{
set_ValueFromPO(COLUMNNAME_M_Product_Category_Parent_ID, org.compiere.model.I_M_Product_Category.class, M_Product_Category_Parent);
}
/** Set Parent Product Category.
@param M_Product_Category_Parent_ID... | @Override
public void setPlannedMargin (java.math.BigDecimal PlannedMargin)
{
set_Value (COLUMNNAME_PlannedMargin, PlannedMargin);
}
/** Get DB1 %.
@return Project's planned margin as a percentage
*/
@Override
public java.math.BigDecimal getPlannedMargin ()
{
BigDecimal bd = (BigDecimal)get_Value(COLU... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Category.java | 1 |
请完成以下Java代码 | public BigDecimal getApprovalAmt()
{
return getGrandTotal();
}
public void setRMA(final MRMA rma)
{
final MInvoice originalInvoice = rma.getOriginalInvoice();
if (originalInvoice == null)
{
throw new AdempiereException("Not invoiced - RMA: " + rma.getDocumentNo());
}
setM_RMA_ID(rma.getM_RMA_ID());... | setUser2_ID(originalInvoice.getUser2_ID());
}
/**
* Document Status is Complete or Closed
*
* @return true if CO, CL or RE
* @deprecated Please use {@link IInvoiceBL#isComplete(I_C_Invoice)}
*/
@Deprecated
public boolean isComplete()
{
return Services.get(IInvoiceBL.class).isComplete(this);
} // i... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MInvoice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
private final ResourceServerProperties sso;
@Autowired
public ResourceServerConfig(ResourceServerProperties sso) {
this.sso = sso;
}
@Bean
@ConfigurationProperties(prefix = "security.oauth2.client")
public... | @Bean
public OAuth2RestTemplate clientCredentialsRestTemplate() {
return new OAuth2RestTemplate(clientCredentialsResourceDetails());
}
@Bean
public ResourceServerTokenServices tokenServices() {
return new CustomUserInfoTokenServices(sso.getUserInfoUri(), sso.getClientId());
}
@... | repos\piggymetrics-master\account-service\src\main\java\com\piggymetrics\account\config\ResourceServerConfig.java | 2 |
请完成以下Java代码 | public void setKeepAliveTimeHours (final @Nullable String KeepAliveTimeHours)
{
set_Value (COLUMNNAME_KeepAliveTimeHours, KeepAliveTimeHours);
}
@Override
public String getKeepAliveTimeHours()
{
return get_ValueAsString(COLUMNNAME_KeepAliveTimeHours);
}
/**
* NotificationType AD_Reference_ID=540643
* ... | set_Value (COLUMNNAME_NotificationType, NotificationType);
}
@Override
public String getNotificationType()
{
return get_ValueAsString(COLUMNNAME_NotificationType);
}
@Override
public void setSkipTimeoutMillis (final int SkipTimeoutMillis)
{
set_Value (COLUMNNAME_SkipTimeoutMillis, SkipTimeoutMillis);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch_Type.java | 1 |
请完成以下Java代码 | public void executeHandler(ModificationBatchConfiguration batchConfiguration,
ExecutionEntity execution,
CommandContext commandContext,
String tenantId) {
ModificationBuilderImpl executionBuilder = (ModificationBuilderImpl) comm... | );
}
@Override
protected ModificationBatchConfigurationJsonConverter getJsonConverterInstance() {
return ModificationBatchConfigurationJsonConverter.INSTANCE;
}
protected ProcessDefinitionEntity getProcessDefinition(CommandContext commandContext, String processDefinitionId) {
return commandContext.... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ModificationBatchJobHandler.java | 1 |
请完成以下Java代码 | public List<Customer> findAll() {
return em.createQuery("select c from Customer c", Customer.class).getResultList();
}
/*
* (non-Javadoc)
* @see example.springdata.jpa.showcase.before.CustomerService#findAll(int, int)
*/
@Override
public List<Customer> findAll(int page, int pageSize) {
var query = em.cr... | }
/*
* (non-Javadoc)
* @see example.springdata.jpa.showcase.before.CustomerService#findByLastname(java.lang.String, int, int)
*/
@Override
public List<Customer> findByLastname(String lastname, int page, int pageSize) {
var query = em.createQuery("select c from Customer c where c.lastname = ?1", Customer.cl... | repos\spring-data-examples-main\jpa\showcase\src\main\java\example\springdata\jpa\showcase\before\CustomerServiceImpl.java | 1 |
请完成以下Java代码 | public List<LoggerConfiguration> getLoggerConfigurations() {
throw new UnsupportedOperationException("Unable to get logger configurations");
}
/**
* Returns the current configuration for a {@link LoggingSystem}'s logger.
* @param loggerName the name of the logger
* @return the current configuration
* @sinc... | */
static class NoOpLoggingSystem extends LoggingSystem {
@Override
public void beforeInitialize() {
}
@Override
public void setLogLevel(@Nullable String loggerName, @Nullable LogLevel level) {
}
@Override
public List<LoggerConfiguration> getLoggerConfigurations() {
return Collections.emptyList... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\LoggingSystem.java | 1 |
请完成以下Java代码 | protected boolean isAggregatedHU(final I_M_HU hu)
{
return handlingUnitsBL.isAggregateHU(hu);
}
@Override
protected int getAggregatedHUsCount(final I_M_HU hu)
{
final I_M_HU_Item parentHUItem = hu.getM_HU_Item_Parent();
if (parentHUItem == null)
{
// shall not happen
return 0;
}
return parentHUI... | return handlingUnitsBL.isVirtual(huObj);
}
IHUIteratorListener toHUIteratorListener()
{
return new HUIteratorListenerAdapter()
{
@Override
public String toString()
{
return MoreObjects.toStringHelper(this).addValue(IncludedHUsCounter.this).toString();
}
@Override
public Result beforeHU(fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\IncludedHUsCounter.java | 1 |
请完成以下Java代码 | public boolean executeMultipleStatements() throws SQLException {
String sql = "INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com');" +
"INSERT INTO users (name, email) VALUES ('Bob', 'bob@example.com');";
try (Statement statement = connection.createStatement()) {
... | statement.execute(sql); // Here we execute the multiple queries
do {
try (ResultSet resultSet = statement.getResultSet()) {
while (resultSet != null && resultSet.next()) {
int id = resultSet.getInt("id");
String name = resu... | repos\tutorials-master\persistence-modules\core-java-persistence-4\src\main\java\com\baeldung\sql\MultipleSQLExecution.java | 1 |
请完成以下Java代码 | public int getTimes() {
return times;
}
public boolean isRepeat() {
return isRepeat;
}
private Date getDateAfterRepeat(Date date) {
// use date without the current offset for due date calculation to get the
// next due date as it would be without any modifications, later add offset
Date da... | return calendar.getTime();
}
private Duration parsePeriod(String period) {
if (period.matches(PnW_PATTERN)) {
return parsePnWDuration(period);
}
return datatypeFactory.newDuration(period);
}
private Duration parsePnWDuration(String period) {
String weeks = period.replaceAll("\\D", "");
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\calendar\DurationHelper.java | 1 |
请完成以下Java代码 | public void setC_Flatrate_DataEntry_IncludedT (final @Nullable java.lang.String C_Flatrate_DataEntry_IncludedT)
{
set_Value (COLUMNNAME_C_Flatrate_DataEntry_IncludedT, C_Flatrate_DataEntry_IncludedT);
}
@Override
public java.lang.String getC_Flatrate_DataEntry_IncludedT()
{
return get_ValueAsString(COLUMNNAM... | return get_ValueAsInt(COLUMNNAME_C_Flatrate_Data_ID);
}
@Override
public void setHasContracts (final boolean HasContracts)
{
set_Value (COLUMNNAME_HasContracts, HasContracts);
}
@Override
public boolean isHasContracts()
{
return get_ValueAsBoolean(COLUMNNAME_HasContracts);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_Data.java | 1 |
请完成以下Java代码 | public class VertragsdatenAbfragenResponse {
@XmlElement(name = "return", namespace = "", required = true)
protected VertragsdatenAntwort _return;
/**
* Gets the value of the return property.
*
* @return
* possible object is
* {@link VertragsdatenAntwort }
*
... | }
/**
* Sets the value of the return property.
*
* @param value
* allowed object is
* {@link VertragsdatenAntwort }
*
*/
public void setReturn(VertragsdatenAntwort value) {
this._return = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VertragsdatenAbfragenResponse.java | 1 |
请完成以下Java代码 | public void setSerializerName(String serializerName) {
typedValueField.setSerializerName(serializerName);
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public Date getCreateTime() {
return createTime;
}
publi... | public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public void delete() {
byteArrayField.deleteByteArrayValue();
Context
.getCommandContext(... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDecisionInputInstanceEntity.java | 1 |
请完成以下Java代码 | public void setQty(final BigDecimal qty)
{
forecastLine.setQty(qty);
final ProductId productId = ProductId.ofRepoIdOrNull(getM_Product_ID());
final I_C_UOM uom = Services.get(IUOMDAO.class).getById(getC_UOM_ID());
final BigDecimal qtyCalculated = Services.get(IUOMConversionBL.class).convertToProductUOM(produc... | @Override
public void setC_BPartner_ID(final int partnerId)
{
values.setC_BPartner_ID(partnerId);
}
@Override
public int getC_BPartner_ID()
{
return values.getC_BPartner_ID();
}
@Override
public boolean isInDispute()
{
return values.isInDispute();
}
@Override
public void setInDispute(final boolean... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\ForecastLineHUPackingAware.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RoleMenuReq extends AbsReq {
/** 角色ID */
private String roleId;
/**菜单ID列表*/
private List<String> menuIdList;
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
} | public List<String> getMenuIdList() {
return menuIdList;
}
public void setMenuIdList(List<String> menuIdList) {
this.menuIdList = menuIdList;
}
@Override
public String toString() {
return "RoleMenuReq{" +
"roleId='" + roleId + '\'' +
", menuI... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\user\RoleMenuReq.java | 2 |
请完成以下Java代码 | public void setBackground (Color bg)
{
if (bg.equals(getBackground()))
return;
super.setBackground(bg);
} // setBackground
/**
* Set Editor to value
* @param value value of the editor
*/
@Override
public void setValue (Object value)
{
if (value == null)
setText("");
else
setText(value.... | * @return current value
*/
@Override
public Object getValue()
{
return new String(super.getPassword());
} // getValue
/**
* Return Display Value
* @return displayed String value
*/
@Override
public String getDisplay()
{
return new String(super.getPassword());
} // getDisplay
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CPassword.java | 1 |
请完成以下Java代码 | public int getCarrier_Goods_Type_ID()
{
return get_ValueAsInt(COLUMNNAME_Carrier_Goods_Type_ID);
}
@Override
public void setExternalId (final java.lang.String ExternalId)
{
set_Value (COLUMNNAME_ExternalId, ExternalId);
}
@Override
public java.lang.String getExternalId()
{
return get_ValueAsString(CO... | @Override
public int getM_Shipper_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Shipper_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_Goods_Type.java | 1 |
请完成以下Java代码 | public List<de.metas.inoutcandidate.model.I_M_ReceiptSchedule> createOrUpdateReceiptSchedules(final Object model_NOTUSED,
final List<de.metas.inoutcandidate.model.I_M_ReceiptSchedule> previousSchedules)
{
// Check if we really have something to customize
if (previousSchedules == null || previousSchedules.isEmpt... | {
return;
}
final I_C_OrderLine orderLine = InterfaceWrapperHelper.create(receiptSchedule.getC_OrderLine(), I_C_OrderLine.class);
final int itemProductID;
final String packDescription;
final BigDecimal qtyItemCapacity;
if (orderLine == null)
{
itemProductID = -1;
packDescription = null;
qtyI... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inoutcandidate\spi\impl\HUReceiptScheduleProducer.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.