instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class MMShippingPackage extends X_M_ShippingPackage
{
/**
*
*/
private static final long serialVersionUID = -150601859277117444L;
/**
* Standard Constructor
* @param ctx context
* @param M_ShippingPackage_ID id
* @param trxName transaction
*/
public MMShippingPackage (Properties ctx, int M_S... | * @return saved
*/
@Override
protected boolean afterSave (boolean newRecord, boolean success)
{
if (!success)
return success;
return updateHeader();
} // afterSave
/**
* Update Header
* @return true if header updated
*/
private boolean updateHeader()
{
// Update header only if the document is n... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\model\MMShippingPackage.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public RecipientRefType getRecipientRef() {
return recipientRef;
}
/**
* Sets the value of the recipientRef property.
*
* @param value
* allowed object is
* {@link RecipientRefType }
*
*/
public void setRecipientRef(RecipientRefType value) {
... | * {@link String }
*
*/
public String getAckRequest() {
return ackRequest;
}
/**
* Sets the value of the ackRequest property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAckRequest(String value) {
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\header\InterchangeHeaderType.java | 2 |
请完成以下Java代码 | public Location getLocation() {
return location;
}
public String getName() {
return name;
}
public void setActive(Boolean active) {
this.active = active;
}
public void setId(Long id) {
this.id = id;
}
public void setItems(List<Item> items) { | this.items = items;
}
public void setItemsSold(Long itemsSold) {
this.itemsSold = itemsSold;
}
public void setLocation(Location location) {
this.location = location;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-2\src\main\java\com\baeldung\boot\domain\Store.java | 1 |
请完成以下Java代码 | public void setMarshaller(Marshaller marshaller) {
Assert.notNull(marshaller, "marshaller must not be null");
this.marshaller = marshaller;
}
/**
* Set the {@link Unmarshaller} to be used by this message converter.
*
* @param unmarshaller The unmarshaller.
*/
public void setUnmarshaller(Unmarshaller unm... | throw new MessageConversionException("Could not marshal [" + object + "]", ex);
}
catch (IOException ex) {
throw new MessageConversionException("Could not marshal [" + object + "]", ex);
}
}
/**
* Unmarshals the given {@link Message} into an object.
*/
@Override
public Object fromMessage(Message mess... | repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\support\converter\MarshallingMessageConverter.java | 1 |
请完成以下Java代码 | private void onDeviceUpdate(DeviceId deviceId, DeviceProfile deviceProfile) {
ObjectNode msgData = JacksonUtil.newObjectNode();
msgData.put("deviceId", deviceId.getId().toString());
if (deviceProfile != null) {
msgData.put("deviceProfileId", deviceProfile.getId().getId().toString());... | }
private void removeDeviceState(DeviceId deviceId) {
DeviceState state = deviceStates.remove(deviceId);
if (config.isPersistAlarmRulesState() && (state != null || !config.isFetchAlarmRulesStateOnStart())) {
ctx.removeRuleNodeStateForEntity(deviceId);
}
}
@Override
... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\profile\TbDeviceProfileNode.java | 1 |
请完成以下Java代码 | public BaseElement getBpmnElement() {
return bpmnElementAttribute.getReferenceTargetElement(this);
}
public void setBpmnElement(BaseElement bpmnElement) {
bpmnElementAttribute.setReferenceTargetElement(this, bpmnElement);
}
public boolean isHorizontal() {
return isHorizontalAttribute.getValue(this... | public void setMessageVisible(boolean isMessageVisible) {
isMessageVisibleAttribute.setValue(this, isMessageVisible);
}
public ParticipantBandKind getParticipantBandKind() {
return participantBandKindAttribute.getValue(this);
}
public void setParticipantBandKind(ParticipantBandKind participantBandKind... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnShapeImpl.java | 1 |
请完成以下Java代码 | public IQueryBuilder<I_Fact_Acct_Summary> retrieveCurrentAndNextMatchingFactAcctSummaryQuery(final Properties ctx, final IFactAcctSummaryKey key)
{
return createFactAcctSummaryQueryForKeyNoDateAcct(ctx, key)
.addCompareFilter(I_Fact_Acct_Summary.COLUMN_DateAcct, Operator.GREATER_OR_EQUAL, key.getDateAcct());
}
... | }
@Override
public String toString()
{
return ObjectUtils.toString(this);
}
@Override
public Properties getCtx()
{
return ctx;
}
@Override
public String getProcessingTag()
{
return processingTag;
}
@Override
public void close()
{
releaseTag(ctx, processingTag);
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\aggregation\legacy\impl\LegacyFactAcctLogDAO.java | 1 |
请完成以下Java代码 | public class ExecutorRouteLRU extends ExecutorRouter {
private static ConcurrentMap<Integer, LinkedHashMap<String, String>> jobLRUMap = new ConcurrentHashMap<Integer, LinkedHashMap<String, String>>();
private static long CACHE_VALID_TIME = 0;
public String route(int jobId, List<String> addressList) {
... | }
if (delKeys.size() > 0) {
for (String delKey: delKeys) {
lruItem.remove(delKey);
}
}
// load
String eldestKey = lruItem.entrySet().iterator().next().getKey();
String eldestValue = lruItem.get(eldestKey);
return eldestValue;
}... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\route\strategy\ExecutorRouteLRU.java | 1 |
请完成以下Java代码 | public GatewayFilter apply(Config config) {
String template = Objects.requireNonNull(config.template, "template must not be null");
UriTemplate uriTemplate = new UriTemplate(template);
return new GatewayFilter() {
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
... | public static class Config {
private @Nullable String template;
public @Nullable String getTemplate() {
return template;
}
public void setTemplate(String template) {
this.template = template;
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SetPathGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public void setMandatoryOnReceipt (final @Nullable java.lang.String MandatoryOnReceipt)
{
set_Value (COLUMNNAME_MandatoryOnReceipt, MandatoryOnReceipt);
}
@Override
public java.lang.String getMandatoryOnReceipt()
{
return get_ValueAsString(COLUMNNAME_MandatoryOnReceipt);
}
/**
* MandatoryOnShipment AD_... | public void setM_AttributeSet(final org.compiere.model.I_M_AttributeSet M_AttributeSet)
{
set_ValueFromPO(COLUMNNAME_M_AttributeSet_ID, org.compiere.model.I_M_AttributeSet.class, M_AttributeSet);
}
@Override
public void setM_AttributeSet_ID (final int M_AttributeSet_ID)
{
if (M_AttributeSet_ID < 0)
set_Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeUse.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ShipmentLinesForCustomsInvoiceRepo
{
public boolean foundAtLeastOneUnregisteredShipment(final ImmutableList<InOutId> selectedShipments)
{
return selectedShipments
.stream()
.filter(this::isValidShipment)
.map(inoutId -> retrieveValidLinesToExport(inoutId))
.findAny()
.isPresent();
... | return true;
}
private boolean isValidShipment(final InOutId shipmentId)
{
final IInOutBL inOutBL = Services.get(IInOutBL.class);
final IInOutDAO inOutDAO = Services.get(IInOutDAO.class);
final I_M_InOut shipment = inOutDAO.getById(shipmentId);
if (!shipment.isSOTrx())
{
return false;
}
if (inOu... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\customs\process\ShipmentLinesForCustomsInvoiceRepo.java | 2 |
请完成以下Java代码 | public void setIsbn(String isbn) {
this.isbn = isbn;
}
public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.author = author;
}
public List<Review> getReviews() {
return reviews;
}
public void setReviews(List<Review> ... | return false;
}
if (getClass() != obj.getClass()) {
return false;
}
return id != null && id.equals(((Book) obj).id);
}
@Override
public int hashCode() {
return 2021;
}
@Override
public String toString() {
return "Book{" + "id=" + id... | repos\Hibernate-SpringBoot-master\HibernateSpringBootPropertyExpressions\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public class SocketJob {
public static void main(String[] args) throws Exception {
// 创建执行环境
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
// 指定并行度,默认电脑线程数
env.setParallelism(3);
// 读取数据socket文本流 指定监听 IP 端口 只有在接收到数据才会执行任务
DataS... | // // 显式地提供类型信息:对于flatMap传入Lambda表达式,系统只能推断出返回的是Tuple2类型,而无法得到Tuple2<String, Long>。只有显式设置系统当前返回类型,才能正确解析出完整数据
.returns(new TypeHint<Tuple2<String, Integer>>() {
})
// .returns(Types.TUPLE(Types.STRING,Types.INT))
.keyBy(value -> value.f0)
.s... | repos\springboot-demo-master\flink\src\main\java\com\et\flink\job\SocketJob.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getHeader() {
return this.header;
}
public void setHeader(@Nullable String header) {
this.header = header;
}
public @Nullable String getQueryParameter() {
return this.queryParameter;
}
public void setQueryParameter(@Nullable String queryParameter) {
this.queryParameter... | public void setPathSegment(@Nullable Integer pathSegment) {
this.pathSegment = pathSegment;
}
public @Nullable String getMediaTypeParameter() {
return this.mediaTypeParameter;
}
public void setMediaTypeParameter(@Nullable String mediaTypeParameter) {
this.mediaTypeParameter = mediaTypeParameter;
}
... | repos\spring-boot-4.0.1\module\spring-boot-http-client\src\main\java\org\springframework\boot\http\client\autoconfigure\ApiversionProperties.java | 2 |
请完成以下Java代码 | public int getAD_User_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_User_ID);
}
@Override
public void setC_User_Assigned_Role_ID (final int C_User_Assigned_Role_ID)
{
if (C_User_Assigned_Role_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_User_Assigned_Role_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_User_... | @Override
public void setC_User_Role_ID (final int C_User_Role_ID)
{
if (C_User_Role_ID < 1)
set_Value (COLUMNNAME_C_User_Role_ID, null);
else
set_Value (COLUMNNAME_C_User_Role_ID, C_User_Role_ID);
}
@Override
public int getC_User_Role_ID()
{
return get_ValueAsInt(COLUMNNAME_C_User_Role_ID);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_User_Assigned_Role.java | 1 |
请完成以下Java代码 | public void setRunsMax (int RunsMax)
{
set_Value (COLUMNNAME_RunsMax, Integer.valueOf(RunsMax));
}
/** Get Maximum Runs.
@return Number of recurring runs
*/
public int getRunsMax ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_RunsMax);
if (ii == null)
return 0;
return ii.intValue();
}
/** Se... | */
public void setRunsRemaining (int RunsRemaining)
{
set_ValueNoCheck (COLUMNNAME_RunsRemaining, Integer.valueOf(RunsRemaining));
}
/** Get Remaining Runs.
@return Number of recurring runs remaining
*/
public int getRunsRemaining ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_RunsRemaining);
if (ii... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Recurring.java | 1 |
请完成以下Java代码 | public static Date parseByDayPattern(String str) {
return parseDate(str, DAY_PATTERN);
}
/**
* Parse date by 'yyyy-MM-dd HH:mm:ss' pattern
*
* @param str
* @return
*/
public static Date parseByDateTimePattern(String str) {
return parseDate(str, DATETIME_PATTERN);
... | * Format date by 'yyyy-MM-dd' pattern
*
* @param date
* @return
*/
public static String formatByDayPattern(Date date) {
if (date != null) {
return DateFormatUtils.format(date, DAY_PATTERN);
} else {
return null;
}
}
/**
* Format date ... | repos\Spring-Boot-In-Action-master\id-spring-boot-starter\src\main\java\com\baidu\fsg\uid\utils\DateUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PropertiesEndpointAccessResolver implements EndpointAccessResolver {
private static final String DEFAULT_ACCESS_KEY = "management.endpoints.access.default";
private static final String ENABLED_BY_DEFAULT_KEY = "management.endpoints.enabled-by-default";
private final PropertyResolver properties;
pri... | private Access resolveAccess(String endpointId, Access defaultAccess) {
String accessKey = "management.endpoint.%s.access".formatted(endpointId);
String enabledKey = "management.endpoint.%s.enabled".formatted(endpointId);
Access access = this.properties.getProperty(accessKey, Access.class);
Boolean enabled = th... | repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\endpoint\PropertiesEndpointAccessResolver.java | 2 |
请完成以下Java代码 | public LookupValuesPage getLookupValuesForQuery(final String query)
{
final LookupDataSource lookupDataSource = getLookupDataSource();
final Evaluatee ctx = getDocument().asEvaluatee();
final LookupValuesPage page = lookupDataSource.findEntities(ctx, query);
lookupValuesStaled = false;
return page;
}
@Ove... | }
return DocumentValidStatus.validField(getFieldName(), isInitialValue());
}
@Override
public DocumentValidStatus getValidStatus()
{
return _validStatus;
}
@Override
public DocumentValidStatus updateStatusIfInitialInvalidAndGet(final IDocumentChangesCollector changesCollector)
{
if (_validStatus.isInit... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentField.java | 1 |
请完成以下Java代码 | public Component getTableCellEditorComponent(JTable table,
Object value, boolean isSelected, int row, int col)
{
log.debug("Value=" + value + ", row=" + row + ", col=" + col);
m_rid = (Object[])value;
if (m_rid == null || m_rid[1] == null)
m_cb.setSelected(false);
else
{
Boolean sel = (Boolean)m_rid... | /**
* Returns the value contained in the editor
*/
@Override
public Object getCellEditorValue()
{
log.debug("" + m_cb.isSelected());
if (m_rid == null)
return null;
m_rid[1] = Boolean.valueOf(m_cb.isSelected());
return m_rid;
} // getCellEditorValue
} // VRowIDEditor | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VRowIDEditor.java | 1 |
请完成以下Spring Boot application配置 | springdoc.api-docs.enabled=false
springdoc.swagger-ui.url=/api_3.yaml
# Properties for custom Springdoc swagger-ui url
#springdoc.swagger-ui.disabl | e-swagger-default-url=true
#springdoc.swagger-ui.path=/myproject | repos\tutorials-master\spring-boot-modules\spring-boot-swagger-2\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public class EchoClient {
private static SocketChannel client;
private static ByteBuffer buffer;
private static EchoClient instance;
public static EchoClient start() {
if (instance == null)
instance = new EchoClient();
return instance;
}
public static void stop() t... | }
public String sendMessage(String msg) {
buffer = ByteBuffer.wrap(msg.getBytes());
String response = null;
try {
client.write(buffer);
buffer.clear();
client.read(buffer);
response = new String(buffer.array()).trim();
System.out.p... | repos\tutorials-master\core-java-modules\core-java-nio\src\main\java\com\baeldung\selector\EchoClient.java | 1 |
请完成以下Java代码 | public class CoordinateMutableKey {
private int x;
private int y;
public CoordinateMutableKey(int x, int y) {
this.x = x;
this.y = y;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y; | }
public void setY(int y) {
this.y = y;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CoordinateMutableKey that = (CoordinateMutableKey) o;
return x ==... | repos\tutorials-master\core-java-modules\core-java-collections-maps-4\src\main\java\com\baeldung\maps\CoordinateMutableKey.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<?> changeDefHome(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
String username = JwtUtil.getUserNameByToken(request);
sysRoleIndex.setRoleCode(username);
sysRoleIndexService.changeDefHome(sysRoleIndex);
// 代码逻辑说明: 切换完成后的homePath获取
String versi... | *
* @return
*/
@GetMapping(value = "/getCurrentHome")
public Result<?> getCurrentHome(HttpServletRequest request) {
String username = JwtUtil.getUserNameByToken(request);
Object homeType = redisUtil.get(DefIndexConst.CACHE_TYPE + username);
return Result.OK(oConvertUtils.getStr... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysRoleIndexController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void customize(FluentConfiguration configuration) {
Extension<SQLServerConfigurationExtension> extension = new Extension<>(configuration,
SQLServerConfigurationExtension.class, "SQL Server");
Sqlserver properties = this.properties.getSqlserver();
PropertyMapper map = PropertyMapper.get();
map.fr... | private final Supplier<E> extension;
Extension(FluentConfiguration configuration, Class<E> type, String name) {
this.extension = SingletonSupplier.of(() -> {
E extension = configuration.getPluginRegister().getExact(type);
Assert.state(extension != null, () -> "Flyway %s extension missing".formatted(name))... | repos\spring-boot-4.0.1\module\spring-boot-flyway\src\main\java\org\springframework\boot\flyway\autoconfigure\FlywayAutoConfiguration.java | 2 |
请完成以下Java代码 | public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
public boolean isRequired() {
return required;... | }
public String getPlaceholder() {
return placeholder;
}
public void setPlaceholder(String placeholder) {
this.placeholder = placeholder;
}
public LayoutDefinition getLayout() {
return layout;
}
public void setLayout(LayoutDefinition layout) {
this.layout ... | repos\flowable-engine-main\modules\flowable-form-model\src\main\java\org\flowable\form\model\FormField.java | 1 |
请完成以下Java代码 | public class InProcessChannelFactory extends AbstractChannelFactory<InProcessChannelBuilder> {
/**
* Creates a new InProcessChannelFactory with the given properties.
*
* @param properties The properties for the channels to create.
* @param globalClientInterceptorRegistry The interceptor registr... | }
@Override
protected InProcessChannelBuilder newChannelBuilder(final String name) {
log.debug("Creating new channel: {}", name);
return InProcessChannelBuilder.forName(name);
}
@Override
protected void configureSecurity(final InProcessChannelBuilder builder, final String name) {
... | repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\channelfactory\InProcessChannelFactory.java | 1 |
请完成以下Java代码 | public class BaeldungSubscriberImpl<T> implements Subscriber<String> {
private Subscription subscription;
private boolean completed = false;
private int counter;
public boolean isCompleted() {
return completed;
}
public void setCompleted(boolean completed) {
this.completed = co... | @Override
public void onNext(String item) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
counter++;
System.out.println("Processed item : " + item);
subscription.request(1);
}
@Override
public ... | repos\tutorials-master\core-java-modules\core-java-9-new-features\src\main\java\com\baeldung\java9\reactive\BaeldungSubscriberImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getTrustedProxies() {
return this.trustedProxies;
}
public void setTrustedProxies(@Nullable String trustedProxies) {
this.trustedProxies = trustedProxies;
}
}
/**
* When to use APR.
*/
public enum UseApr {
/**
* Always use APR and fail if it's not available.
*/ | ALWAYS,
/**
* Use APR if it is available.
*/
WHEN_AVAILABLE,
/**
* Never use APR.
*/
NEVER
}
} | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\autoconfigure\TomcatServerProperties.java | 2 |
请完成以下Java代码 | public MRMALine[] getChargeLines()
{
StringBuffer whereClause = new StringBuffer();
whereClause.append("IsActive='Y' AND M_RMA_ID=");
whereClause.append(get_ID());
whereClause.append(" AND C_Charge_ID IS NOT null");
int rmaLineIds[] = MRMALine.getAllIDs(MRMALine.Table_Name, ... | } // getProcessMsg
/**
* Get Document Owner (Responsible)
* @return AD_User_ID
*/
@Override
public int getDoc_User_ID()
{
return getSalesRep_ID();
} // getDoc_User_ID
/**
* Get Document Approval Amount
* @return amount
*/
@Override
public BigDecimal getApprovalAmt()
{
return getAmt();
} //... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MRMA.java | 1 |
请完成以下Java代码 | public Money subtractPercent(@NonNull final Percent percent, @NonNull final Money input)
{
if (percent.isZero())
{
return input;
}
if (input.isZero())
{
return input;
}
final Currency currency = currencyRepository.getById(input.getCurrencyId());
final BigDecimal newValue = percent.subtractFrom... | {
final CurrencyId currencyId = currencyRepository.getCurrencyIdByCurrencyCode(amount.getCurrencyCode());
return Money.of(amount.getAsBigDecimal(), currencyId);
}
public Money multiply(
@NonNull final Quantity qty,
@NonNull final ProductPrice price)
{
final IUOMConversionBL uomConversionBL = Services.ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\money\MoneyService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JSONDocumentChangeLog getDocumentChangeLog(
@PathVariable("windowId") final String windowIdStr,
@PathVariable("documentId") final String documentIdStr,
@PathVariable("tabId") final String tabIdStr,
@PathVariable("rowId") final String rowIdStr)
{
final WindowId windowId = WindowId.fromJson(windowId... | )
{
return healthCheck(JsonWindowHealthCheckRequest.builder()
.onlyAdWindowIds(RepoIdAwares.ofCommaSeparatedSet(windowIdsCommaSeparated, AdWindowId.class))
.checkContextVariables(false)
.build());
}
@PostMapping("/health")
public JsonWindowsHealthCheckResponse healthCheck(@RequestBody JsonWindowHealt... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\controller\WindowRestController.java | 2 |
请完成以下Java代码 | public class FactAcctOpenItemsToUpdateDBTableWatcher implements Runnable
{
private static final Logger logger = LogManager.getLogger(FactAcctOpenItemsToUpdateDBTableWatcher.class);
private final ISysConfigBL sysConfigBL;
private final FAOpenItemsService faOpenItemsService;
private static final String SYSCONFIG_Pol... | {
logger.warn("Failed to process. Ignored.", ex);
}
}
}
private void processNow()
{
boolean mightHaveMore;
do
{
final int processedCount = faOpenItemsService.processScheduled();
mightHaveMore = processedCount > 0;
}
while (mightHaveMore);
}
private Duration getPollInterval()
{
final i... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\open_items\updater\FactAcctOpenItemsToUpdateDBTableWatcher.java | 1 |
请完成以下Java代码 | public class Character {
private String name;
private int age;
private String race;
private String characterClass;
private String cityOfOrigin;
private String favoriteWeapon;
private String bio;
public Character(String name, int age, String characterClass, String shortBio) {
th... | public String getRace() {
return race;
}
public void setRace(String race) {
this.race = race;
}
public void setCharacterClass(String characterClass) {
this.characterClass = characterClass;
}
public void setBio(String bio) {
this.bio = bio;
}
public Str... | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springaistructuredoutput\dto\Character.java | 1 |
请完成以下Java代码 | public Set<Map.Entry<String, TermFrequency>> getUniGram()
{
return trieSingle.entrySet();
}
/**
* 获取二阶共现
* @return
*/
public Set<Map.Entry<String, PairFrequency>> getBiGram()
{
return triePair.entrySet();
}
/**
* 获取三阶共现
* @return
*/
public ... | // "1职位简介\n" +
// "算法工程师是一个非常高端的职位;\n" +
// "专业要求:计算机、电子、通信、数学等相关专业;\n" +
// "学历要求:本科及其以上的学历,大多数是硕士学历及其以上;\n" +
// "语言要求:英语要求是熟练,基本上能阅读国外专业书刊;\n" +
// ... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\occurrence\Occurrence.java | 1 |
请完成以下Java代码 | public int getM_LotCtlExclude_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_LotCtlExclude_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_M_LotCtl getM_LotCtl() throws RuntimeException
{
return (I_M_LotCtl)MTable.get(getCtx(), I_M_LotCtl.Table_Name)
.getPO(getM_LotCtl_ID()... | set_ValueNoCheck (COLUMNNAME_M_LotCtl_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_LotCtl_ID, Integer.valueOf(M_LotCtl_ID));
}
/** Get Lot Control.
@return Product Lot Control
*/
public int getM_LotCtl_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_LotCtl_ID);
if (ii == null)
return 0;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_LotCtlExclude.java | 1 |
请完成以下Java代码 | public static Double findLargestWithWrapper(double[] array) {
Double max = null;
for (double value : array) {
if (!Double.isNaN(value) && !Double.isInfinite(value)) {
if (max == null || value > max) {
max = value;
}
... | double max = Double.NEGATIVE_INFINITY;
boolean foundValidValue = false;
for (double value : array) {
if (!Double.isNaN(value) && !Double.isInfinite(value)) {
if (!foundValidValue || value > max) {
max = value;
foundValidValue =... | repos\tutorials-master\core-java-modules\core-java-numbers-10\src\main\java\com\baeldung\doublenonvalues\DoubleNonValue.java | 1 |
请完成以下Java代码 | private void updateCatchUomId(@NonNull final I_M_ShipmentSchedule sched)
{
final UomId catchUOMId = sched.isCatchWeight()
? productsService.getCatchUOMId(ProductId.ofRepoId(sched.getM_Product_ID())).orElse(null)
: null;
sched.setCatch_UOM_ID(UomId.toRepoId(catchUOMId));
}
private void invalidatePicking... | if (pickingBOMProductIds.isEmpty())
{
return Stream.empty();
}
final Set<WarehouseId> warehouseIds = warehousesRepo.getWarehouseIdsOfSamePickingGroup(olAndSched.getWarehouseId());
final LinkedHashSet<IShipmentScheduleSegment> segments = new LinkedHashSet<>();
for (final WarehouseId warehouseId : wa... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ShipmentScheduleUpdater.java | 1 |
请完成以下Java代码 | public Descriptors.Descriptor getTelemetryDynamicMessageDescriptor(String deviceTelemetryProtoSchema) {
return DynamicProtoUtils.getDescriptor(deviceTelemetryProtoSchema, TELEMETRY_PROTO_SCHEMA);
}
public Descriptors.Descriptor getAttributesDynamicMessageDescriptor(String deviceAttributesProtoSchema) {... | "message RpcResponseMsg {\n" +
" optional string payload = 1;\n" +
"}";
}
}
public String getDeviceRpcRequestProtoSchema() {
if (StringUtils.isNotEmpty(deviceRpcRequestProtoSchema)) {
return deviceRpcRequestProtoSchema;
} else {
... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\device\profile\ProtoTransportPayloadConfiguration.java | 1 |
请完成以下Java代码 | public TaxPeriod1 getPrd() {
return prd;
}
/**
* Sets the value of the prd property.
*
* @param value
* allowed object is
* {@link TaxPeriod1 }
*
*/
public void setPrd(TaxPeriod1 value) {
this.prd = value;
}
/**
* Gets the value... | */
public void setTaxAmt(TaxAmount1 value) {
this.taxAmt = value;
}
/**
* Gets the value of the addtlInf property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddtlInf() {
return addtlInf;
}
/**
... | 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\TaxRecord1.java | 1 |
请完成以下Java代码 | public void setPhone(String phone) {
this.phone = phone;
}
public LocalDate getBirthday() {
return birthday;
}
public void setBirthday(LocalDate birthday) {
this.birthday = birthday;
}
public LocalDateTime getLastUpdate() {
return lastUpdate;
} | public void setLastUpdate(LocalDateTime lastUpdate) {
this.lastUpdate = lastUpdate;
}
public Contact() {
}
public Contact(String name, String address, String phone, LocalDate birthday, LocalDateTime lastUpdate) {
this.name = name;
this.address = address;
this.phone = ph... | repos\tutorials-master\spring-boot-modules\spring-boot-data\src\main\java\com\baeldung\jsondateformat\Contact.java | 1 |
请完成以下Java代码 | public class ProcessUpdatedListenerDelegate implements ActivitiEventListener {
private List<ProcessRuntimeEventListener<ProcessUpdatedEvent>> processRuntimeEventListeners;
private ToProcessUpdatedConverter processUpdatedConverter;
public ProcessUpdatedListenerDelegate(
List<ProcessRuntimeEventLis... | if (event instanceof ActivitiEntityEvent) {
processUpdatedConverter
.from((ActivitiEntityEvent) event)
.ifPresent(convertedEvent -> {
for (ProcessRuntimeEventListener<ProcessUpdatedEvent> listener : processRuntimeEventListeners) {
l... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\internal\ProcessUpdatedListenerDelegate.java | 1 |
请完成以下Java代码 | public static ByteArrayStream createByteArrayStream(String path)
{
if (HanLP.Config.IOAdapter == null) return ByteArrayFileStream.createByteArrayFileStream(path);
try
{
InputStream is = HanLP.Config.IOAdapter.open(path);
if (is instanceof FileInputStream) return Byte... | @Override
public double nextDouble()
{
ensureAvailableBytes(8);
return super.nextDouble();
}
@Override
public byte nextByte()
{
ensureAvailableBytes(1);
return super.nextByte();
}
@Override
public float nextFloat()
{
ensureAvailableBytes(... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\io\ByteArrayStream.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class EnumTypeHandler<E extends Enum<?> & BaseEnum> extends BaseTypeHandler<BaseEnum> {
private Class<E> type;
public EnumTypeHandler(Class<E> type) {
if (type == null) {
throw new IllegalArgumentException("Type argument cannot be null");
}
this.type = type;
}
... | @Override
public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
int code = cs.getInt(columnIndex);
return cs.wasNull() ? null : codeOf(code);
}
private E codeOf(int code){
try {
return EnumUtil.codeOf(type, code);
} catch (Except... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\typehandler\EnumTypeHandler.java | 2 |
请完成以下Java代码 | public class HttpStatusRequestRejectedHandler implements RequestRejectedHandler {
private static final Log logger = LogFactory.getLog(HttpStatusRequestRejectedHandler.class);
private final int httpError;
/**
* Constructs an instance which uses {@code 400} as response code.
*/
public HttpStatusRequestRejected... | * @param httpError http status code to use
*/
public HttpStatusRequestRejectedHandler(int httpError) {
this.httpError = httpError;
}
@Override
public void handle(HttpServletRequest request, HttpServletResponse response,
RequestRejectedException requestRejectedException) throws IOException {
logger.debug(L... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\firewall\HttpStatusRequestRejectedHandler.java | 1 |
请完成以下Java代码 | public void update(QueueKey queueKey, Set<TopicPartitionInfo> newPartitions, RestoreCallback callback) {
newPartitions = withTopic(newPartitions, eventConsumer.getTopic());
var writeLock = partitionsLock.writeLock();
writeLock.lock();
Set<TopicPartitionInfo> oldPartitions = this.partitio... | }
deletePartitions(partitions);
}
protected void deletePartitions(Set<TopicPartitionInfo> partitions) {
eventConsumer.delete(withTopic(partitions, eventConsumer.getTopic()));
for (PartitionedQueueConsumerManager<?> consumer : otherConsumers) {
consumer.removePartitions(withT... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\common\state\QueueStateService.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: fakebank
datasource:
url: jdbc:mysql://localhost:3306/fakebank?serverTimezone=GMT-3
hikari:
connection-test-query: select 1
idle-timeout: 5000
max-lifetime: 120000
maximum-pool-size: 5
minimum-idle: 5
cloud:
vault:
uri: https://localho... | application-name: fakebank
database:
enabled: true
role: fakebank-accounts-ro
backend: database
username-property: spring.datasource.username
password-property: spring.datasource.password
config:
import: vault:// | repos\tutorials-master\spring-cloud-modules\spring-cloud-vault\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public OAuth2AccessTokenResponse.Builder getAccessTokenResponse() {
return get(OAuth2AccessTokenResponse.Builder.class);
}
/**
* Constructs a new {@link Builder} with the provided
* {@link OAuth2AccessTokenAuthenticationToken}.
* @param authentication the {@link OAuth2AccessTokenAuthenticationToken}
* @ret... | /**
* Sets the {@link OAuth2AccessTokenResponse.Builder access token response
* builder}.
* @param accessTokenResponse the {@link OAuth2AccessTokenResponse.Builder}
* @return the {@link Builder} for further configuration
*/
public Builder accessTokenResponse(OAuth2AccessTokenResponse.Builder accessToke... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2AccessTokenAuthenticationContext.java | 1 |
请完成以下Java代码 | public XmlRequest toCrossVersionRequest(@NonNull final InputStream xmlInput)
{
final JAXBElement<RequestType> jaxbRequest = JaxbUtil.unmarshalToJaxbElement(xmlInput, RequestType.class);
return Invoice450ToCrossVersionModelTool.INSTANCE.toCrossVersionModel(jaxbRequest.getValue());
}
@Override
public String get... | {
return XmlVersion.v450;
}
public XmlRequest augmentRequest(final XmlRequest xAugmentedRequest, final BPartnerId invoice)
{
return Invoice450FromCrossVersionModelTool.INSTANCE.augmentRequest(xAugmentedRequest, invoice);
}
@VisibleForTesting
public void setUsePrettyPrint(final boolean usePrettyPrint)
{
t... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\Invoice450RequestConversionService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RawMaterialsIssueOnlyWhatWasReceivedActivityHandler implements WFActivityHandler, UserConfirmationSupport
{
public static final WFActivityType HANDLED_ACTIVITY_TYPE = WFActivityType.ofString("manufacturing.rawMaterialsIssueOnlyWhatWasReceived");
private final ManufacturingJobService jobService;
@Overr... | extractManufacturingJob(request),
extractIssueStrategy(request)
);
}
@NonNull
private static RawMaterialsIssueStrategy extractIssueStrategy(@NonNull final UserConfirmationRequest request)
{
final ManufacturingJobActivity activity = extractManufacturingJobActivity(request);
final IssueOnlyWhatWasReceivedC... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\issue\RawMaterialsIssueOnlyWhatWasReceivedActivityHandler.java | 2 |
请完成以下Java代码 | protected boolean writeExtensionChildElements(
BaseElement element,
boolean didWriteExtensionStartElement,
XMLStreamWriter xtw
) throws Exception {
ServiceTask serviceTask = (ServiceTask) element;
if (!serviceTask.getCustomProperties().isEmpty()) {
for (CustomPro... | didWriteExtensionStartElement = FieldExtensionExport.writeFieldExtensions(
serviceTask.getFieldExtensions(),
didWriteExtensionStartElement,
xtw
);
}
return didWriteExtensionStartElement;
}
@Override
protected void writeAdditionalC... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\ServiceTaskXMLConverter.java | 1 |
请完成以下Java代码 | public class Graph {
private Map<Integer, List<Integer>> adjVertices;
public Graph() {
this.adjVertices = new HashMap<Integer, List<Integer>>();
}
public void addVertex(int vertex) {
adjVertices.putIfAbsent(vertex, new ArrayList<>());
}
public void addEdge(int src, int dest) ... | if (!isVisited[dest])
dfsRecursive(dest, isVisited);
}
return isVisited;
}
public List<Integer> topologicalSort(int start) {
LinkedList<Integer> result = new LinkedList<Integer>();
boolean[] isVisited = new boolean[adjVertices.size()];
topologicalSortRecu... | repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\dfs\Graph.java | 1 |
请完成以下Java代码 | public void setStartDate (Timestamp StartDate)
{
set_Value (COLUMNNAME_StartDate, StartDate);
}
/** Get Start Date.
@return First effective day (inclusive)
*/
public Timestamp getStartDate ()
{
return (Timestamp)get_Value(COLUMNNAME_StartDate);
}
/** Set Summary.
@param Summary
Textual summary o... | /** 80% Nearly Done = 8 */
public static final String TASKSTATUS_80NearlyDone = "8";
/** 40% Busy = 4 */
public static final String TASKSTATUS_40Busy = "4";
/** 60% Good Progress = 6 */
public static final String TASKSTATUS_60GoodProgress = "6";
/** 90% Finishing = 9 */
public static final String TASKSTATUS_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestAction.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8080
dubbo:
application:
# 服务名称,保持唯一
name: server-provider
# zookeeper地址,用于向其注册服务
registry:
address: zookeeper://127.0.0.1:2181
#暴露服务方式
protocol:
# dubbo协议,固定写法
name: d | ubbo
# 暴露服务端口 (默认是20880,不同的服务提供者端口不能重复)
port: 20880
monitor:
protocol: registry | repos\SpringAll-master\52.Dubbo-OPS-Mointor\spring-boot-dubbo-applicaiton\server-provider\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public IHUPIItemProductDisplayNameBuilder setM_HU_PI_Item_Product(final I_M_HU_PI_Item_Product huPIItemProduct)
{
_huPIItemProduct = huPIItemProduct;
return this;
}
@Override
public IHUPIItemProductDisplayNameBuilder setM_HU_PI_Item_Product(@NonNull final HUPIItemProductId id)
{
final I_M_HU_PI_Item_Produc... | {
setQtyTUMoved(BigDecimal.valueOf(qtyTUMoved));
return this;
}
@Override
public HUPIItemProductDisplayNameBuilder setQtyCapacity(final BigDecimal qtyCapacity)
{
_qtyCapacity = qtyCapacity;
return this;
}
@Override
public IHUPIItemProductDisplayNameBuilder setShowAnyProductIndicator(boolean showAnyProd... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductDisplayNameBuilder.java | 1 |
请完成以下Java代码 | public Builder clearViewCloseActions()
{
allowedViewCloseActions = new LinkedHashSet<>();
return this;
}
public Builder allowViewCloseAction(@NonNull final ViewCloseAction viewCloseAction)
{
if (allowedViewCloseActions == null)
{
allowedViewCloseActions = new LinkedHashSet<>();
}
allowed... | this.treeCollapsible = treeCollapsible;
return this;
}
public Builder setTreeExpandedDepth(final int treeExpandedDepth)
{
this.treeExpandedDepth = treeExpandedDepth;
return this;
}
public Builder setAllowOpeningRowDetails(final boolean allowOpeningRowDetails)
{
this.allowOpeningRowDetails = al... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\ViewLayout.java | 1 |
请完成以下Java代码 | final class ConfigurationPropertiesJsr303Validator implements Validator {
private static final String[] VALIDATOR_CLASSES = { "jakarta.validation.Validator",
"jakarta.validation.ValidatorFactory", "jakarta.validation.bootstrap.GenericBootstrap" };
private final Delegate delegate;
private final Class<?> validat... | }
}
return true;
}
private static class Delegate extends LocalValidatorFactoryBean {
Delegate(ApplicationContext applicationContext) {
setApplicationContext(applicationContext);
setMessageInterpolator(new MessageInterpolatorFactory(applicationContext).getObject());
afterPropertiesSet();
}
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\ConfigurationPropertiesJsr303Validator.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
protected boolean isSerializationTextBased() {
// for the moment we assume that all spin data formats are text based.
return true;
}
protected String getTypeNameForDeserialized(Object deserializedObject) {
return dataFormat.getMapper().getCanonicalTypeN... | IoUtil.closeSilently(inReader);
IoUtil.closeSilently(bufferedReader);
}
}
protected boolean canSerializeValue(Object value) {
return dataFormat.getMapper().canMap(value);
}
protected DeserializationTypeValidator getValidator(final ProcessEngineConfigurationImpl processEngineConfiguration) {
... | repos\camunda-bpm-platform-master\engine-plugins\spin-plugin\src\main\java\org\camunda\spin\plugin\impl\SpinObjectValueSerializer.java | 1 |
请完成以下Java代码 | public class Application {
private DataSource inventoryDataSource;
private DataSource orderDataSource;
public Application(DataSource inventoryDataSource, DataSource orderDataSource) {
this.inventoryDataSource = inventoryDataSource;
this.orderDataSource = orderDataSource;
}
public ... | s2.close();
inventoryConnection.close();
orderConnection.close();
} catch (Exception e) {
System.out.println(e.getMessage());
rollback = true;
} finally {
if (!rollback)
utx.commit();
else
utx.rollbac... | repos\tutorials-master\persistence-modules\atomikos\src\main\java\com\baeldung\atomikos\direct\Application.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PostalId implements RepoIdAware
{
@JsonCreator
@NonNull
public static PostalId ofRepoId(final int repoId)
{
return new PostalId(repoId);
}
@Nullable
public static PostalId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new PostalId(repoId) : null;
}
public static Optional<PostalId> ... | private PostalId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Postal_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static boolean equals(@Nullable final PostalId postalId1, @Nullable final PostalId postalId2)
{
return Objects.equals(postalId1,... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\PostalId.java | 2 |
请完成以下Java代码 | public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setSource_Table_ID (final int Source_Table_ID)
{
if (Source_Table_ID < 1)
set_Value (COLUMNNAME_... | @Override
public void setSQL_GroupAndOrderBy (final @Nullable java.lang.String SQL_GroupAndOrderBy)
{
set_Value (COLUMNNAME_SQL_GroupAndOrderBy, SQL_GroupAndOrderBy);
}
@Override
public java.lang.String getSQL_GroupAndOrderBy()
{
return get_ValueAsString(COLUMNNAME_SQL_GroupAndOrderBy);
}
@Override
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_KPI.java | 1 |
请完成以下Java代码 | public Optional<Instant> getMinInventoryDate(@NonNull final Collection<InventoryId> inventoryIds)
{
if (inventoryIds.isEmpty())
{
return Optional.empty();
}
return queryBL.createQueryBuilder(I_M_Inventory.class)
.addInArrayFilter(I_M_Inventory.COLUMN_M_Inventory_ID, inventoryIds)
.addOnlyActiveReco... | @Override
public Stream<I_M_Inventory> stream(@NonNull InventoryQuery query)
{
return toSqlQuery(query).stream();
}
private IQuery<I_M_Inventory> toSqlQuery(@NonNull InventoryQuery query)
{
return queryBL.createQueryBuilder(I_M_Inventory.class)
.orderBy(I_M_Inventory.COLUMN_MovementDate)
.orderBy(I_M_... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inventory\impl\InventoryDAO.java | 1 |
请完成以下Java代码 | private ProductCategoryId getProductCategoryForGroupTemplateId()
{
final I_C_InvoiceLine invoiceLine = getC_InvoiceLine();
final int orderLineRecordId = invoiceLine.getC_OrderLine_ID();
if (orderLineRecordId <= 0)
{
return null;
}
final I_C_OrderLine orderLineRecord = orderDAO.getOrderLineById(orderLin... | return null;
}
final GroupTemplateId groupTemplateId = group.getGroupTemplateId();
if (groupTemplateId == null)
{
return null;
}
return productDAO.retrieveProductCategoryForGroupTemplateId(groupTemplateId);
}
@Override
protected OrderId getSalesOrderId()
{
final I_C_InvoiceLine invoiceLine = get... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_Invoice.java | 1 |
请完成以下Java代码 | public JsonWFProcess closeTarget(@PathVariable("wfProcessId") @NonNull final String wfProcessIdStr)
{
assertApplicationAccess();
final WFProcessId wfProcessId = WFProcessId.ofString(wfProcessIdStr);
final WFProcess wfProcess = mobileApplication.closeTarget(wfProcessId, getLoggedUserId());
return workflowRestC... | return JsonConsolidateResponse.builder()
.wfProcess(workflowRestController.toJson(wfProcess))
.pickingSlotContent(pickingSlotContent)
.build();
}
@GetMapping("/job/{wfProcessId}/pickingSlot/{pickingSlotId}")
public JsonHUConsolidationJobPickingSlotContent getPickingSlotContent(
@PathVariable("wfProce... | repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\rest_api\HUConsolidationRestController.java | 1 |
请完成以下Java代码 | public String getContext() {
return context;
}
public boolean isEngineTablePresent() {
return isTablePresent(getEngineTableName());
}
protected String addMissingComponent(String missingComponents, String component) {
if (missingComponents == null) {
return "Tables m... | int latestChangeLogVersionOrder = 0;
String changeLogVersion = null;
try (ResultSet resultSet = statement.executeQuery()) {
while (resultSet.next()) {
String changeLogVersionId = resultSet.getString(1);
int changeLogVers... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\db\EngineSqlScriptBasedDbSchemaManager.java | 1 |
请完成以下Java代码 | public boolean isTrlTable()
{
return tableName.toUpperCase().endsWith("_TRL");
}
}
@Value
public static final class SqlSelect
{
private final String sql;
private final ImmutableList<TableNameAndAlias> tableNameAndAliases;
@Builder
private SqlSelect(
@NonNull final String sql,
@NonNull @Sing... | }
return tableNameAndAliases.get(0).getAliasOrTableName();
}
public String getFirstTableNameOrEmpty()
{
if (tableNameAndAliases.isEmpty())
{
return "";
}
return tableNameAndAliases.get(0).getTableName();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\ParsedSql.java | 1 |
请完成以下Java代码 | private void createOrderBOMLine(
final I_PP_Order_BOM orderBOM,
final I_PP_Product_BOMLine bomLine)
{
final I_PP_Order_BOMLine orderBOMLine = InterfaceWrapperHelper.newInstance(I_PP_Order_BOMLine.class, ppOrder);
// Set Defaults
orderBOMLine.setDescription("");
//
// Update from PP_Product BOM Line
... | private Quantity computeQtyRequired(final I_PP_Order_BOMLine orderBOMLine)
{
final PPOrderDocBaseType docBaseType = getOrderDocBaseType();
if (docBaseType.isRepairOrder())
{
final UomId uomId = UomId.ofRepoId(orderBOMLine.getC_UOM_ID());
return Quantitys.zero(uomId);
}
else
{
final Quantity qtyFin... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\impl\PPOrderBOMCreateCommand.java | 1 |
请完成以下Java代码 | public static Result evaluate(String goldFile, String predFile, String dictPath) throws IOException
{
IOUtil.LineIterator goldIter = new IOUtil.LineIterator(goldFile);
IOUtil.LineIterator predIter = new IOUtil.LineIterator(predFile);
CWSEvaluator evaluator = new CWSEvaluator(dictPath);
... | {
P = p;
R = r;
F1 = f1;
this.OOV_R = OOV_R;
this.IV_R = IV_R;
}
@Override
public String toString()
{
return String.format("P:%.2f R:%.2f F1:%.2f OOV-R:%.2f IV-R:%.2f", P, R, F1, OOV_R, IV_R);
}
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\common\CWSEvaluator.java | 1 |
请完成以下Java代码 | public String getISO_Code_To ()
{
return (String)get_Value(COLUMNNAME_ISO_Code_To);
}
/** Set Multiply Rate.
@param MultiplyRate
Rate to multiple the source by to calculate the target.
*/
public void setMultiplyRate (BigDecimal MultiplyRate)
{
set_Value (COLUMNNAME_MultiplyRate, MultiplyRate);
}
/... | Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Valid from.
@param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (Timesta... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Conversion_Rate.java | 1 |
请完成以下Java代码 | public Object getPersistentState() {
HashMap<String, Object> state = new HashMap<String, Object>();
state.put("userId", userId);
state.put("groupId", groupId);
state.put("resourceType", resourceType);
state.put("resourceId", resourceId);
state.put("permissions", permissions);
state.... | @Override
public Set<String> getReferencedEntityIds() {
Set<String> referencedEntityIds = new HashSet<String>();
return referencedEntityIds;
}
@Override
public Map<String, Class> getReferencedEntitiesIdAndClass() {
Map<String, Class> referenceIdAndClass = new HashMap<String, Class>();
return re... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AuthorizationEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CasAuthenticationProvider casAuthenticationProvider(
TicketValidator ticketValidator,
ServiceProperties serviceProperties) {
CasAuthenticationProvider provider = new CasAuthenticationProvider();
provider.setServiceProperties(serviceProperties);
provider.setTicketValidator(tick... | }
@Bean
public LogoutFilter logoutFilter() {
LogoutFilter logoutFilter = new LogoutFilter("https://localhost:8443/cas/logout", securityContextLogoutHandler());
logoutFilter.setFilterProcessesUrl("/logout/cas");
return logoutFilter;
}
@Bean
public SingleSignOutFilter singleS... | repos\tutorials-master\security-modules\cas\cas-secured-app\src\main\java\com\baeldung\cassecuredapp\CasSecuredApplication.java | 2 |
请完成以下Java代码 | public class UserSql {
private static final Logger log = LoggerFactory.getLogger(UserSql.class);
public String getList(UserParam userParam) {
StringBuffer sql = new StringBuffer("select id, userName, passWord, user_sex as userSex, nick_name as nickName");
sql.append(" from users where 1=1 ");
... | public String getCount(UserParam userParam) {
String sql= new SQL(){{
SELECT("count(1)");
FROM("users");
if (StringUtils.isNotBlank(userParam.getUserName())) {
WHERE("userName = #{userName}");
}
if (StringUtils.isNotBlank(userParam.getUs... | repos\spring-boot-leaning-master\1.x\第07课:Spring Boot 集成 MyBatis\spring-boot-mybatis-annotation\src\main\java\com\neo\mapper\UserSql.java | 1 |
请完成以下Java代码 | public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2)
{
return -o1.getValue().compareTo(o2.getValue());
}
});
for (Map.Entry<String, Integer> entry : entries)
{
sb.append(' '); // 现阶段词典分隔符统一使用空格
... | if (param.indexOf('\t') > 0) mark = "\t";
String[] array = param.split(mark);
return create(array);
}
public static Item create(String param[])
{
if (param.length % 2 == 0) return null;
Item item = new Item(param[0]);
int natureCount = (param.length - 1) / 2;
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\item\Item.java | 1 |
请完成以下Java代码 | public class SelectionRecursiveCombinationGenerator {
private static final int N = 6;
private static final int R = 3;
/**
* Generate all combinations of r elements from a set
* @param n - number of elements in input set
* @param r - number of elements to be chosen
* @return the list c... | combinations.add(combination);
} else {
int max = Math.min(end, end + 1 - data.length + index);
for (int i = start; i <= max; i++) {
data[index] = i;
helper(combinations, data, i + 1, end, index + 1);
}
}
}
public static void m... | repos\tutorials-master\core-java-modules\core-java-lang-math-2\src\main\java\com\baeldung\algorithms\combination\SelectionRecursiveCombinationGenerator.java | 1 |
请完成以下Java代码 | public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getDiagramResourceName() {
return diagramResourceName;
}
public void setDiagramResourceName(String diagramResourceName) {
this.... | }
public void setEngineVersion(String engineVersion) {
this.engineVersion = engineVersion;
}
public IOSpecification getIoSpecification() {
return ioSpecification;
}
public void setIoSpecification(IOSpecification ioSpecification) {
this.ioSpecification = ioSpecification;
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isMatch() {
return this.match;
}
/**
* Return an outcome message or {@code null}.
* @return the message or {@code null}
*/
public @Nullable String getMessage() {
return this.message.isEmpty() ? null : this.message.toString();
}
/**
* Return an outcome message.
* @return the message
... | if (obj == null) {
return false;
}
if (getClass() == obj.getClass()) {
ConditionOutcome other = (ConditionOutcome) obj;
return (this.match == other.match && ObjectUtils.nullSafeEquals(this.message, other.message));
}
return super.equals(obj);
}
@Override
public int hashCode() {
return Boolean.has... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\condition\ConditionOutcome.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DubboAutoConfiguration {
/**
* Start a non-daemon thread
*
* @return DubboServer
*/
@Bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.dubbo", name = "server", havingValue = "true")
public DubboServer dubboServer() {
final DubboServer dubboServer = new DubboS... | awaitThread.start();
try {
latch.await();
} catch (InterruptedException e) {
throw new IllegalStateException(e);
}
return dubboServer;
}
@Bean
public DubboHealthIndicator dubboHealthIndicator() {
return new DubboHealthIndicator();
}
} | repos\dubbo-spring-boot-starter-master\src\main\java\com\alibaba\dubbo\spring\boot\DubboAutoConfiguration.java | 2 |
请完成以下Java代码 | public void setEmail(String email) {
this.email = email;
}
public String getCantonlev() {
return cantonlev;
}
public void setCantonlev(String cantonlev) {
this.cantonlev = cantonlev;
}
public String getTaxorgcode() {
return taxorgcode;
}
public void se... | public void setEnd(String end) {
this.end = end;
}
public String getQrcantonid() {
return qrcantonid;
}
public void setQrcantonid(String qrcantonid) {
this.qrcantonid = qrcantonid;
}
public String getDeclare() {
return declare;
}
public void setDeclare... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\canton\Canton.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class EnvironmentUtils {
/**
* Extras The properties from {@link ConfigurableEnvironment}
*
* @param environment {@link ConfigurableEnvironment}
* @return Read-only Map
*/
public static Map<String, Object> extractProperties(ConfigurableEnvironment environment) {
... | for (String propertyName : propertyNames) {
if (!properties.containsKey(propertyName)) { // put If absent
properties.put(propertyName, propertySource.getProperty(propertyName));
}
}
}
}
return properties;
... | repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\autoconfigure\src\main\java\org\apache\dubbo\spring\boot\util\EnvironmentUtils.java | 2 |
请完成以下Java代码 | public class AttributeSplitResult implements IAttributeSplitResult
{
private final Object splitValue;
private final Object remainingValue;
public AttributeSplitResult(final Object splitValue, final Object remainingValue)
{
super();
this.splitValue = splitValue;
this.remainingValue = remainingValue;
}
@Ove... | return "AttributeSplitResult [splitValue=" + splitValue + ", remainingValue=" + remainingValue + "]";
}
@Override
public Object getSplitValue()
{
return splitValue;
}
@Override
public Object getRemainingValue()
{
return remainingValue;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\strategy\impl\AttributeSplitResult.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public BigDecimal getFactor() {
return factor;
}
/**
* Sets the value of the factor property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setFactor(BigDecimal value) {
this.factor = value;
}
/**
*... | *
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ArticleNumberExtType }
*
*
*/
public List<ArticleNumberExtType> getBaseUnitArticleNumber() {
if (baseUnitArticleNumber == null) {
baseUnitArticleNumber = new ArrayList<ArticleNumberExtTyp... | 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\UnitConversionType.java | 2 |
请完成以下Java代码 | public void setQtyCUsPerTU (final BigDecimal QtyCUsPerTU)
{
set_Value (COLUMNNAME_QtyCUsPerTU, QtyCUsPerTU);
}
@Override
public BigDecimal getQtyCUsPerTU()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyCUsPerTU);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyLU (... | public BigDecimal getQtyLU()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyLU);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyTU (final BigDecimal QtyTU)
{
set_Value (COLUMNNAME_QtyTU, QtyTU);
}
@Override
public BigDecimal getQtyTU()
{
final BigDecimal bd = g... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_LUTU_Configuration.java | 1 |
请完成以下Java代码 | public void setCM_Media_Server_ID (int CM_Media_Server_ID)
{
if (CM_Media_Server_ID < 1)
set_ValueNoCheck (COLUMNNAME_CM_Media_Server_ID, null);
else
set_ValueNoCheck (COLUMNNAME_CM_Media_Server_ID, Integer.valueOf(CM_Media_Server_ID));
}
/** Get Media Server.
@return Media Server list to which conten... | if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Last Synchronized.
@param LastSynchronized
Date when last synchronized
*/
public void setLastSynchronized (Timestamp LastSynchronized)
{
set_Value (COLUMNNAME_LastSynchronized, L... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_MediaDeploy.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void onTbApplicationEvent(PartitionChangeEvent partitionChangeEvent) {
if (ServiceType.TB_CORE.equals(partitionChangeEvent.getServiceType())) {
currentPartitions.clear();
currentPartitions.addAll(partitionChangeEvent.getCorePartitions());
}
}
protected void for... | }
@Override
public void onFailure(Throwable t) {}
}, executor);
}
protected static Consumer<Throwable> safeCallback(FutureCallback<Void> callback) {
if (callback != null) {
return callback::onFailure;
} else {
return throwable -> {};
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\telemetry\AbstractSubscriptionService.java | 2 |
请完成以下Java代码 | private boolean isEligible(final IAllocationRequest request)
{
// NOTE: don't throw exception but just return false,
// because we have the case where are multiple storages in a pool and each of them are asked if they can fullfill a given request
return Objects.equals(request.getProductId(), getProductId());
}... | return qtyFree.signum() == 0;
}
@Override
public final void markStaled()
{
beforeMarkingStalled();
_capacity = null;
}
/**
* This method is called when {@link #markStaled()} is executed, right before resetting the status.
*
* NOTE: To be implemented by extending classes.
*/
protected void beforeMar... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\AbstractProductStorage.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setAD_User_Attribute_ID (final int AD_User_Attribute_ID)
{
if (AD_User_Attribute_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_User_Attribute_ID, null);
else
s... | {
return get_ValueAsInt(COLUMNNAME_AD_User_ID);
}
/**
* Attribute AD_Reference_ID=541332
* Reference name: AD_User_Attribute
*/
public static final int ATTRIBUTE_AD_Reference_ID=541332;
/** Delegate = D */
public static final String ATTRIBUTE_Delegate = "D";
/** Politician = P */
public static final St... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Attribute.java | 1 |
请完成以下Java代码 | protected String determineExpiredUrl(HttpServletRequest request, SessionInformation info) {
Assert.notNull(this.expiredUrl, "expiredUrl cannot be null");
return this.expiredUrl;
}
private void doLogout(HttpServletRequest request, HttpServletResponse response) {
Authentication auth = this.securityContextHolderS... | Assert.notNull(redirectStrategy, "redirectStrategy cannot be null");
this.redirectStrategy = redirectStrategy;
}
/**
* A {@link SessionInformationExpiredStrategy} that writes an error message to the
* response body.
*
* @author Rob Winch
* @since 4.2
*/
private static final class ResponseBodySessionIn... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\session\ConcurrentSessionFilter.java | 1 |
请完成以下Java代码 | public void setPP_Product_BOM_ID (int PP_Product_BOM_ID)
{
if (PP_Product_BOM_ID < 1)
set_Value (COLUMNNAME_PP_Product_BOM_ID, null);
else
set_Value (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID));
}
/** Get BOM & Formula.
@return BOM & Formula
*/
public int getPP_Product_BOM_ID... | @return Valid from including this date (first day)
*/
public Timestamp getValidFrom ()
{
return (Timestamp)get_Value(COLUMNNAME_ValidFrom);
}
/** Set Valid to.
@param ValidTo
Valid to including this date (last day)
*/
public void setValidTo (Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_QM_Specification.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AvailableFonts extends JRDefaultScriptlet
{
public static String retrieveAvailableFontsUsingGraphicsEnvironment()
{
final StringBuilder sb = new StringBuilder();
Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
for (int i = 0; i < fonts.length; i++)
{
sb.append... | final Collection<String> extensionFonts = FontUtil.getInstance(context).getFontNames();
final StringBuilder sb = new StringBuilder();
extensionFonts.forEach(name -> {
sb.append(name);
sb.append("\n");
});
return sb.toString();
}
public static void main(String[] args)
{
System.out.println(r... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\fonts\AvailableFonts.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setHeaderDescription(String value) {
this.headerDescription = value;
}
/**
* A list of different line items. Used to group line items of a certain kind together.Gets the value of the itemList property.
*
* <p>
* This accessor method returns a reference to the live list,... | * @return
* possible object is
* {@link String }
*
*/
public String getFooterDescription() {
return footerDescription;
}
/**
* Sets the value of the footerDescription property.
*
* @param value
* allowed object is
* {@link String }
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DetailsType.java | 2 |
请完成以下Java代码 | public void setReplicationType (String ReplicationType)
{
set_Value (COLUMNNAME_ReplicationType, ReplicationType);
}
/** Get Replication Type.
@return Type of Data Replication
*/
public String getReplicationType ()
{
return (String)get_Value(COLUMNNAME_ReplicationType);
}
public I_EXP_Format getEXP_... | public void setEXP_Format_ID (int EXP_Format_ID)
{
if (EXP_Format_ID < 1)
set_ValueNoCheck (COLUMNNAME_EXP_Format_ID, null);
else
set_ValueNoCheck (COLUMNNAME_EXP_Format_ID, Integer.valueOf(EXP_Format_ID));
}
public int getEXP_Format_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Format_ID);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationTable.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String resetOperatorPwd(HttpServletRequest req, Long id, String newPwd, String newPwd2, Model model, DwzAjax dwz) {
try {
PmsOperator operator = pmsOperatorService.getDataById(id);
if (operator == null) {
return operateError("无法获取要重置密码的操作员信息", model);
}
// 普通操作员没有修改超级管理员的权限
if ("USER".equal... | * 验证重置密码
*
* @param newPwd
* @param newPwd2
* @return
*/
private String validatePassword(String newPwd, String newPwd2) {
String msg = ""; // 用于存放校验提示信息的变量
if (StringUtils.isBlank(newPwd)) {
msg += "新密码不能为空,";
} else if (newPwd.length() < 6) {
msg += "新密码不能少于6位长度,";
}
if (!newPwd.equals(new... | repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\permission\controller\PmsOperatorController.java | 2 |
请完成以下Java代码 | public static BusinessRuleWarningTarget sqlLookup(@NonNull AdTableId adTableId, @NonNull String lookupSQL)
{
return _builder()
.type(BusinessRuleWarningTargetType.SQL_LOOKUP)
.sqlLookup(SqlLookup.builder()
.adTableId(adTableId)
.sql(lookupSQL)
.build())
.build();
}
public SqlLookup g... | //
//
//
@Value
@Builder
public static class SqlLookup
{
@NonNull AdTableId adTableId;
@NonNull String sql;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\business_rule\descriptor\model\BusinessRuleWarningTarget.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProductDetails
{
@NonNull
private String productCode;
private ProductCodeType productCodeType;
@NonNull
private String lot;
@NonNull
private String serialNumber;
@NonNull
private JsonExpirationDate expirationDate;
@NonNull
private JsonProductPackageState activeStatus;
private String inactive... | public void productDecommissioned(@NonNull final String decommissionedServerTransactionId)
{
if (decommissioned)
{
throw new AdempiereException("Product already decommissioned: " + this);
}
this.decommissioned = true;
this.decommissionedServerTransactionId = decommissionedServerTransactionId;
}
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\product\ProductDetails.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Key getKey() {
return this.key;
}
public Options getOptions() {
return this.options;
}
public String getProtocol() {
return this.protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public boolean isReloadOnUpdate() {
return this.reloadOnUpdate;
}
public voi... | /**
* The password used to access the key in the key store.
*/
private @Nullable String password;
/**
* The alias that identifies the key in the key store.
*/
private @Nullable String alias;
public @Nullable String getPassword() {
return this.password;
}
public void setPassword(@Nullable S... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ssl\SslBundleProperties.java | 2 |
请完成以下Java代码 | public final class CrossOriginResourcePolicyServerHttpHeadersWriter implements ServerHttpHeadersWriter {
public static final String RESOURCE_POLICY = "Cross-Origin-Resource-Policy";
private @Nullable ServerHttpHeadersWriter delegate;
/**
* Sets the {@link CrossOriginResourcePolicy} value to be used in the
* {... | public enum CrossOriginResourcePolicy {
SAME_SITE("same-site"),
SAME_ORIGIN("same-origin"),
CROSS_ORIGIN("cross-origin");
private final String policy;
CrossOriginResourcePolicy(String policy) {
this.policy = policy;
}
public String getPolicy() {
return this.policy;
}
}
} | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\CrossOriginResourcePolicyServerHttpHeadersWriter.java | 1 |
请完成以下Java代码 | public void bindTo(MeterRegistry registry) {
this.pool.getMetrics().ifPresent((poolMetrics) -> {
bindConnectionPoolMetric(registry,
Gauge.builder(metricKey("acquired"), poolMetrics, PoolMetrics::acquiredSize)
.description("Size of successfully acquired connections which are in active use."));
bindCon... | .description("Maximum size of allocated connections that this pool allows."));
bindConnectionPoolMetric(registry,
Gauge.builder(metricKey("max.pending"), poolMetrics, PoolMetrics::getMaxPendingAcquireSize)
.description("Maximum size of pending state to acquire connections that this pool allows."));
});
... | repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\metrics\ConnectionPoolMetrics.java | 1 |
请完成以下Java代码 | protected class ExecuteListQueryCmd<T> implements Command<List<T>> {
protected String statement;
protected QueryParameters parameter;
public ExecuteListQueryCmd(String statement, QueryParameters parameter) {
this.statement = statement;
this.parameter = parameter;
}
@Override
publi... | protected class ExecuteSingleQueryCmd<T> implements Command<T> {
protected String statement;
protected Object parameter;
protected Class clazz;
public <T> ExecuteSingleQueryCmd(String statement, Object parameter, Class<T> clazz) {
this.statement = statement;
this.parameter = parameter;
... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\db\QueryServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
@ApiModelProperty(example = "http://localhost:8182/runtime/process-definitions/oneTaskProcess%3A1%3A4")
public String getProcessDefinitionUrl() {
return processDefinitionUrl;
... | public String getSubScopeId() {
return subScopeId;
}
public void setSubScopeId(String subScopeId) {
this.subScopeId = subScopeId;
}
@ApiModelProperty(example = "cmmn")
public String getScopeType() {
return scopeType;
}
public void setScopeType(String scopeType) {
... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\task\TaskResponse.java | 2 |
请完成以下Java代码 | public boolean isExcludedAttribute(Attribute attribute, AttributeSetId attributeSetId, int columnId, SOTrx soTrx)
{
final I_M_AttributeSetExclude attributeSetExclude = attributeExcludeDAO.retrieveAttributeSetExclude(attributeSetId, columnId, soTrx);
if (null == attributeSetExclude)
{
return false;
}
final... | {
// We have a match. Attribute excluded.
return true;
}
}
return false;
}
@Override
public I_M_AttributeSetExclude getAttributeSetExclude(@NonNull final AttributeSetId attributeSetId, int columnId, @NonNull SOTrx soTrx)
{
return attributeExcludeDAO.retrieveAttributeSetExclude(attributeSetId, co... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\mm\attributes\api\impl\AttributeExcludeBL.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.