instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public Date getTimeBefore(Date endTime) {
// FUTURE_TODO: implement QUARTZ-423
return null;
}
/**
* NOT YET IMPLEMENTED: Returns the final time that the
* <code>CronExpression</code> will match.
*/
public Date getFinalFireTime() {
// FUTURE_TODO: implement QUARTZ-42... | case 10:
return 31;
case 11:
return 30;
case 12:
return 31;
default:
throw new IllegalArgumentException("Illegal month number: "
+ monthNum);
}
}
private void readObject(java... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\cron\CronExpression.java | 1 |
请完成以下Java代码 | public final class DeviceId
{
private final String value;
private DeviceId(@NonNull final String value)
{
this.value = StringUtils.trimBlankToNull(value);
if (this.value == null)
{
throw new AdempiereException("Invalid deviceId: " + value);
}
}
@JsonCreator
public static DeviceId ofString(@NonNull fi... | return valueNorm != null ? new DeviceId(valueNorm) : null;
}
@Override
@Deprecated
public String toString()
{
return getAsString();
}
@JsonValue
public String getAsString()
{
return value;
}
public static boolean equals(@Nullable final DeviceId deviceId1, @Nullable final DeviceId deviceId2) {return Ob... | repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\accessor\DeviceId.java | 1 |
请完成以下Java代码 | public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getDataType() {
return dataType;
}
public void setDataType(Str... | return resolvedBy;
}
public void setResolvedBy(String resolvedBy) {
this.resolvedBy = resolvedBy;
}
public Date getClosedTime() {
return closedTime;
}
public void setClosedTime(Date closedTime) {
this.closedTime = closedTime;
}
public String getClosedBy() {
return closedBy;
}
public void setClosedBy(S... | repos\springBoot-master\springboot-shiro\src\main\java\com\us\bean\Event.java | 1 |
请完成以下Java代码 | public int hashCode() {
int hash = 3;
hash = 79 * hash + Objects.hashCode(this.name);
hash = 79 * hash + this.age;
return hash;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == ... | if (getClass() != obj.getClass()) {
return false;
}
final AuthorNameAge other = (AuthorNameAge) obj;
if (this.age != other.age) {
return false;
}
if (!Objects.equals(this.name, other.name)) {
return false;
}
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoViaClassBasedProjections\src\main\java\com\bookstore\projection\AuthorNameAge.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ProductId getCommissionProduct(@NonNull final ConditionsId conditionsId)
{
final I_C_Flatrate_Conditions conditionsRecord = InterfaceWrapperHelper.loadOutOfTrx(conditionsId, I_C_Flatrate_Conditions.class);
final TypeConditions typeConditions = TypeConditions.ofCode(conditionsRecord.getType_Conditions());
... | public boolean productPreventsCommissioning(@Nullable final ProductId productId)
{
if (productId == null)
{
return false; // no product also means nothing is prevented
}
final IProductDAO productDAO = Services.get(IProductDAO.class);
final I_M_Product productRecord = productDAO.getById(productId);
if (... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\CommissionProductService.java | 2 |
请完成以下Java代码 | public class BulkDeleteOperation {
protected String statement;
protected Object parameter;
public BulkDeleteOperation(String statement, Object parameter) {
this.statement = statement;
this.parameter = parameter;
}
public void execute(SqlSession sqlSession, Class<? extends Entity> ... | public void setStatement(String statement) {
this.statement = statement;
}
public Object getParameter() {
return parameter;
}
public void setParameter(Object parameter) {
this.parameter = parameter;
}
@Override
public String toString() {
return "bulk delete... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\db\BulkDeleteOperation.java | 1 |
请完成以下Java代码 | public boolean isClientOnly()
{
return this == ClientOnly;
}
/**
* @return true if it has Organization flag set
*/
public boolean isOrganization()
{
return (accesses & Organization.accesses) > 0;
}
/**
* @return true if it has only the Organization flag set (i.e. it's {@value #Organization})
*/
pu... | accessLevelInfo.append(getAccessLevelString());
if (isSystem())
{
accessLevelInfo.append(" - System");
}
if (isClient())
{
accessLevelInfo.append(" - Client");
}
if (isOrganization())
{
accessLevelInfo.append(" - Org");
}
return accessLevelInfo.toString();
}
// --------------------------... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\TableAccessLevel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PlainSqlEntityFieldBinding implements SqlEntityFieldBinding
{
public static PlainSqlEntityFieldBinding mandatoryIntField(final String columnName)
{
return builder()
.columnName(columnName)
.widgetType(DocumentFieldWidgetType.Integer)
.mandatory(true)
.build();
}
String columnName;
S... | @NonNull final DocumentFieldWidgetType widgetType,
final Class<?> sqlValueClass,
final SqlOrderByValue sqlOrderBy,
final boolean virtualColumn,
final boolean mandatory)
{
this.columnName = columnName;
this.sqlSelectValue = sqlSelectValue;
this.widgetType = widgetType;
this.sqlValueClass = sqlValueC... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\PlainSqlEntityFieldBinding.java | 2 |
请完成以下Java代码 | final class ClassPathIndexFile {
private final File root;
private final Set<String> lines;
private ClassPathIndexFile(File root, List<String> lines) {
this.root = root;
this.lines = lines.stream().map(this::extractName).collect(Collectors.toCollection(LinkedHashSet::new));
}
private String extractName(Stri... | static ClassPathIndexFile loadIfPossible(File root, String location) throws IOException {
return loadIfPossible(root, new File(root, location));
}
private static ClassPathIndexFile loadIfPossible(File root, File indexFile) throws IOException {
if (indexFile.exists() && indexFile.isFile()) {
List<String> lines... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\launch\ClassPathIndexFile.java | 1 |
请完成以下Java代码 | protected @Nullable Object headerValueToAddIn(@Nullable Header header) {
if (header == null || header.value() == null) {
return null;
}
String mapped = mapRawIn(header.key(), header.value());
return mapped != null ? mapped : header.value();
}
@Nullable
private String mapRawIn(String header, byte[] value)... | private final boolean negate;
protected SimplePatternBasedHeaderMatcher(String pattern) {
this(pattern.startsWith("!") ? pattern.substring(1) : pattern, pattern.startsWith("!"));
}
SimplePatternBasedHeaderMatcher(String pattern, boolean negate) {
Assert.notNull(pattern, "Pattern must no be null");
this... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\AbstractKafkaHeaderMapper.java | 1 |
请完成以下Java代码 | public int getC_MembershipMonth_ID()
{
return get_ValueAsInt(COLUMNNAME_C_MembershipMonth_ID);
}
@Override
public org.compiere.model.I_C_Year getC_Year()
{
return get_ValueAsPO(COLUMNNAME_C_Year_ID, org.compiere.model.I_C_Year.class);
}
@Override
public void setC_Year(final org.compiere.model.I_C_Year C_... | }
@Override
public int getC_Year_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Year_ID);
}
@Override
public void setValidTo (final @Nullable java.sql.Timestamp ValidTo)
{
set_ValueNoCheck (COLUMNNAME_ValidTo, ValidTo);
}
@Override
public java.sql.Timestamp getValidTo()
{
return get_ValueAsTimestamp(CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_MembershipMonth.java | 1 |
请完成以下Java代码 | public String inline(ModelMap map) {
map.addAttribute("userName", "neo");
return "inline";
}
@RequestMapping("/object")
public String object(HttpServletRequest request) {
request.setAttribute("request","i am request");
request.getSession().setAttribute("session","i am sessio... | map.addAttribute("date", new Date());
return "utility";
}
private List<User> getUserList(){
List<User> list=new ArrayList<User>();
User user1=new User("大牛",12,"123456");
User user2=new User("小牛",6,"123563");
User user3=new User("纯洁的微笑",66,"666666");
list.add(user... | repos\spring-boot-leaning-master\2.x_42_courses\第 2-4 课 模板引擎 Thymeleaf 高阶用法\spring-boot-thymeleaf\src\main\java\com\neo\web\ExampleController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Message {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String text;
public Message() {
}
public Message(String text) {
this.text = text;
}
public String getText() { | return text;
}
public void setText(String text) {
this.text = text;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
} | repos\tutorials-master\persistence-modules\java-jpa-4\src\main\java\com\baeldung\jpa\stringcast\Message.java | 2 |
请完成以下Java代码 | public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public String getExternalTaskId() {
return externalTaskId;
}
public void setExternalTaskId(Stri... | public String getAnnotation() {
return annotation;
}
public void setAnnotation(String annotation) {
this.annotation = annotation;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\oplog\UserOperationLogContextEntry.java | 1 |
请完成以下Java代码 | public void setIdAttribute(String namespaceUri, String localName, String value) {
setAttribute(namespaceUri, localName, value, true);
}
public void removeAttribute(String localName) {
removeAttribute(getNamespaceURI(), localName);
}
public void removeAttribute(String namespaceUri, String localName) {
... | prefix = null;
}
if (prefix == null) {
// generate prefix
prefix = ((DomDocumentImpl) getDocument()).getUnusedGenericNsPrefix();
}
registerNamespace(prefix, namespaceUri);
return prefix;
}
else {
return lookupPrefix;
}
}
}
pu... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\instance\DomElementImpl.java | 1 |
请完成以下Java代码 | default GatewayFilter apply(@Nullable String routeId, Consumer<C> consumer) {
C config = newConfig();
consumer.accept(config);
return apply(routeId, config);
}
default GatewayFilter apply(Consumer<C> consumer) {
C config = newConfig();
consumer.accept(config);
return apply(config);
}
default Class<C> ... | throw new UnsupportedOperationException("newConfig() not implemented");
}
GatewayFilter apply(C config);
default GatewayFilter apply(@Nullable String routeId, C config) {
if (config instanceof HasRouteId) {
HasRouteId hasRouteId = (HasRouteId) config;
hasRouteId.setRouteId(routeId);
}
return apply(conf... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\GatewayFilterFactory.java | 1 |
请完成以下Java代码 | public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
log.trace("[{}] Received msg: {}", ctx.channel().id(), msg);
if (msg instanceof HAProxyMessage) {
HAProxyMessage proxyMsg = (HAProxyMessage) msg;
if (proxyMsg.sourceAddress() != null && proxyMsg.sou... | private void closeChannel(ChannelHandlerContext ctx) {
while (ctx.pipeline().last() != this) {
ChannelHandler handler = ctx.pipeline().removeLast();
if (handler instanceof ChannelInboundHandlerAdapter) {
try {
((ChannelInboundHandlerAdapter) handler).c... | repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\limits\ProxyIpFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static JsonReportError toJsonReportError(final Throwable throwable, final String adLanguage)
{
final Throwable cause = AdempiereException.extractCause(throwable);
final String adLanguageEffective = Check.isNotBlank(adLanguage)
? adLanguage
: Language.getBaseAD_Language();
return JsonReportError... | {
return "<null>";
}
else if (value instanceof ITranslatableString)
{
return ((ITranslatableString)value).translate(adLanguage);
}
else if (value instanceof RepoIdAware)
{
return String.valueOf(((RepoIdAware)value).getRepoId());
}
else if (value instanceof ReferenceListAwareEnum)
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\rest\ReportRestController.java | 2 |
请完成以下Java代码 | protected void doRollback() throws Exception {
// managed transaction, mark rollback-only if not done so already
Transaction transaction = getTransaction();
int status = transaction.getStatus();
if (status != Status.STATUS_NO_TRANSACTION && status != Status.STATUS_ROLLEDBACK) {
transaction.setRoll... | protected boolean isTransactionActiveInternal() throws Exception {
return transactionManager.getStatus() != Status.STATUS_MARKED_ROLLBACK && transactionManager.getStatus() != Status.STATUS_NO_TRANSACTION;
}
public static class JtaTransactionStateSynchronization extends TransactionStateSynchronization implement... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\jta\JakartaTransactionContext.java | 1 |
请完成以下Java代码 | public class ListAndSetContainsBenchmark {
public static void main(String[] args) throws IOException, RunnerException {
Options opt = new OptionsBuilder()
.include(ListAndSetContainsBenchmark.class.getSimpleName())
.forks(1)
.addProfiler("gc")
.build();
new R... | public static class Params {
@Param({"5000000"})
public int searchElement;
@Param({"10000000"})
public int collectionSize;
public List<Integer> arrayList;
public Set<Integer> hashSet;
@Setup(Level.Iteration)
public void setup() {
arrayList =... | repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\listandset\benchmark\ListAndSetContainsBenchmark.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DemoApplicationConfiguration {
private Logger logger = LoggerFactory.getLogger(DemoApplicationConfiguration.class);
@Bean
public UserDetailsService myUserDetailsService() {
InMemoryUserDetailsManager inMemoryUserDetailsManager = new InMemoryUserDetailsManager();
String[][] us... | authoritiesStrings
.stream()
.map(s -> new SimpleGrantedAuthority(s))
.collect(Collectors.toList())
)
);
}
return inMemoryUserDetailsManager;
}
@Bean
public PasswordEncoder passwordEncoder()... | repos\Activiti-develop\activiti-examples\activiti-api-basic-full-example-bean\src\main\java\org\activiti\examples\DemoApplicationConfiguration.java | 2 |
请完成以下Java代码 | public int getC_JobRemuneration_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_JobRemuneration_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_Remuneration getC_Remuneration() throws RuntimeException
{
return (I_C_Remuneration)MTable.get(getCtx(), I_C_Remuneration.Table_Name... | @return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Valid from.
@param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (Timestamp ValidFrom)
{
set_Value (COLUMNNAME_Valid... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_JobRemuneration.java | 1 |
请完成以下Java代码 | public class BaseResp<T> {
/**
* 返回码
*/
private int code;
/**
* 返回信息描述
*/
private String message;
/**
* 返回数据
*/
private T data;
private long currentTime;
public int getCode() {
return code;
}
public void setCode(int code) {
this.... | /**
*
* @param code 错误码
* @param message 信息
* @param data 数据
*/
public BaseResp(int code, String message, T data) {
this.code = code;
this.message = message;
this.data = data;
this.currentTime = new Date().getTime();
}
/**
* 不带数据的返回结果
* @pa... | repos\spring-boot-quick-master\quick-exception\src\main\java\com\quick\exception\utils\BaseResp.java | 1 |
请完成以下Java代码 | public void deleteHistoricVariableInstancesByTaskId(String taskId) {
if (isHistoryEnabled()) {
HistoricVariableInstanceQuery historicProcessVariableQuery = new HistoricVariableInstanceQueryImpl().taskIdIn(taskId);
List<HistoricVariableInstance> historicProcessVariables = historicProcessVariableQuery.lis... | @SuppressWarnings("unchecked")
public List<HistoricVariableInstance> findHistoricVariableInstancesByNativeQuery(Map<String, Object> parameterMap, int firstResult, int
maxResults) {
return getDbEntityManager().selectListWithRawParameter("selectHistoricVariableInstanceByNativeQuery", parameterMap, firstRe... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricVariableInstanceManager.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TitleId implements RepoIdAware
{
@JsonCreator
public static TitleId ofRepoId(final int repoId)
{
return new TitleId(repoId);
}
public static TitleId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new TitleId(repoId) : null;
}
public static int toRepoId(@Nullable final TitleId titleId)... | final int defaultValue)
{
return titleId != null ? titleId.getRepoId() : defaultValue;
}
int repoId;
private TitleId(final int titleRepoId)
{
this.repoId = Check.assumeGreaterThanZero(titleRepoId, "titleRepoId");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\title\TitleId.java | 2 |
请完成以下Java代码 | public Integer value1() {
return getId();
}
@Override
public String value2() {
return getFirstName();
}
@Override
public String value3() {
return getLastName();
}
@Override
public Integer value4() {
return getAge();
}
@Override
public A... | value1(value1);
value2(value2);
value3(value3);
value4(value4);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\records\AuthorRecord.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RedisMessageListener extends MessageListenerAdapter {
private static final Logger logger = LoggerFactory.getLogger(RedisPublisher.class);
@Autowired
CacheManager cacheManager;
@Override
public void onMessage(Message message, byte[] pattern) {
super.onMessage(message, pattern);... | case REDIS_CACHE_DELETE_TOPIC:
// 获取一级缓存,并删除一级缓存数据
((LayeringCache) cache).getFirstCache().evict(key);
logger.info("删除一级缓存{}数据,key:{}", cacheName, key.toString().getBytes());
break;
case REDIS_CACHE_CLEAR_TOPIC:
... | repos\spring-boot-student-master\spring-boot-student-cache-redis-caffeine\src\main\java\com\xiaolyuh\cache\listener\RedisMessageListener.java | 2 |
请完成以下Spring Boot application配置 | #redis\u914D\u7F6E
#redis
#database name
spring.redis.database=0
#server host
#spring.redis.host=192.168.3.34
spring.redis.host=192.168.1.2
#server passw | ord
spring.redis.password=
#connection port
spring.redis.port=6378 | repos\spring-boot-student-master\spring-boot-student-hystrix\src\main\resources\application-dev2.properties | 2 |
请完成以下Java代码 | public class PRTADPrinterHWTypeConverter
{
protected final transient ObjectFactory factory = new ObjectFactory();
public List<PRTADPrinterHWType> mkPRTADPrinterHWs(final PrinterHWList printerHWList, final int sessionId)
{
final List<PrinterHW> printers = printerHWList.getHwPrinters();
if (printerHWList == null ... | printerHW.setName(printer.getName());
// ADempiere Specific Data
printerHW.setReplicationEventAttr(ReplicationEventEnum.AfterChange);
printerHW.setReplicationModeAttr(ReplicationModeEnum.Table);
printerHW.setReplicationTypeAttr(ReplicationTypeEnum.Merge);
printerHW.setVersionAttr(JAXBConstants.PRT_AD_PRINTER... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.esb.base\src\main\java\de\metas\printing\esb\base\inout\bean\PRTADPrinterHWTypeConverter.java | 1 |
请完成以下Java代码 | public void modifyVariables(PatchVariablesDto patch) {
VariableMap variableModifications = null;
try {
variableModifications = VariableValueDto.toMap(patch.getModifications(), engine, objectMapper);
} catch (RestException e) {
String errorMessage = String.format("Cannot modify variables for %s:... | }
protected abstract VariableMap getVariableEntities(boolean deserializeValues);
protected abstract void updateVariableEntities(VariableMap variables, List<String> deletions);
protected abstract TypedValue getVariableEntity(String variableKey, boolean deserializeValue);
protected abstract void setVariableEn... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\impl\AbstractVariablesResource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Article {\n");
sb.append(" customerNumber: ").append(toIndentedString(customerNumber)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(... | sb.append(" pharmacyOnly: ").append(toIndentedString(pharmacyOnly)).append("\n");
sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the firs... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\Article.java | 2 |
请完成以下Java代码 | public void format(LogEvent event, StringBuilder toAppendTo) {
StringBuilder buf = new StringBuilder();
for (PatternFormatter formatter : this.formatters) {
formatter.format(event, buf);
}
if (!buf.isEmpty()) {
AnsiElement element = this.styling;
if (element == null) {
// Assume highlighting
el... | */
public static @Nullable ColorConverter newInstance(@Nullable Configuration config, @Nullable String[] options) {
if (options.length < 1) {
LOGGER.error("Incorrect number of options on style. Expected at least 1, received {}", options.length);
return null;
}
if (options[0] == null) {
LOGGER.error("No ... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\log4j2\ColorConverter.java | 1 |
请完成以下Java代码 | public void setReplenishType (java.lang.String ReplenishType)
{
set_Value (COLUMNNAME_ReplenishType, ReplenishType);
}
@Override
public java.lang.String getReplenishType()
{
return (java.lang.String)get_Value(COLUMNNAME_ReplenishType);
}
@Override
public void setTimeToMarket (int TimeToMarket)
{
set_... | @Override
public int getTimeToMarket()
{
return get_ValueAsInt(COLUMNNAME_TimeToMarket);
}
@Override
public void setWarehouseValue (java.lang.String WarehouseValue)
{
set_Value (COLUMNNAME_WarehouseValue, WarehouseValue);
}
@Override
public java.lang.String getWarehouseValue()
{
return (java.lang.St... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Replenish.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BPartnerAttachmentsProcessor implements Processor
{
@Override
public void process(final Exchange exchange)
{
final BPartnerAttachmentsRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, GRSSignumConstants.ROUTE_PROPERTY_ATTACH_FILE_CONTEXT, BPartnerAttachmentsRouteContext.class);
... | final JsonAttachment attachment = JsonAttachmentUtil.createLocalFileJsonAttachment(basePathForExportDirectories, jsonBPartnerAttachment.getAttachmentFilePath());
return JsonAttachmentRequest.builder()
.targets(ImmutableList.of(JsonExternalReferenceTarget.ofTypeAndId(EXTERNAL_REF_TYPE_BPARTNER, jsonBPartnerAtta... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\attachment\processor\BPartnerAttachmentsProcessor.java | 2 |
请完成以下Java代码 | public class BpmnPlaneImpl extends PlaneImpl implements BpmnPlane {
protected static AttributeReference<BaseElement> bpmnElementAttribute;
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(BpmnPlane.class, BPMNDI_ELEMENT_BPMN_PLANE)
... | typeBuilder.build();
}
public BpmnPlaneImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public BaseElement getBpmnElement() {
return bpmnElementAttribute.getReferenceTargetElement(this);
}
public void setBpmnElement(BaseElement bpmnElement) {
bpmnElementAttribute.set... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnPlaneImpl.java | 1 |
请完成以下Java代码 | private void registerArchiveAwareTables()
{
final Properties ctx = Env.getCtx();
final List<I_AD_Column> archiveColumns = new Query(ctx, I_AD_Column.Table_Name, I_AD_Column.COLUMNNAME_ColumnName + "=?", ITrx.TRXNAME_None)
.setParameters(org.compiere.model.I_AD_Archive.COLUMNNAME_AD_Archive_ID)
.setOnlyActi... | if (processId == null)
{
final AdempiereException ex = new AdempiereException("No AD_Process_ID found for " + ExportArchivePDF.class);
Archive_Main_Validator.logger.error(ex.getLocalizedMessage(), ex);
return;
}
for (final I_AD_Column column : archiveColumns)
{
if (!DisplayType.isLookup(column.getA... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\interceptor\Archive_Main_Validator.java | 1 |
请完成以下Java代码 | public class DefaultOidcUser extends DefaultOAuth2User implements OidcUser {
@Serial
private static final long serialVersionUID = -2378469202439157250L;
private final OidcIdToken idToken;
private final OidcUserInfo userInfo;
/**
* Constructs a {@code DefaultOidcUser} using the provided parameters.
* @param... | /**
* Constructs a {@code DefaultOidcUser} using the provided parameters.
* @param authorities the authorities granted to the user
* @param idToken the {@link OidcIdToken ID Token} containing claims about the user
* @param userInfo the {@link OidcUserInfo UserInfo} containing claims about the user,
* may be {... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\user\DefaultOidcUser.java | 1 |
请完成以下Java代码 | public static void setDeferredContext(Supplier<SecurityContext> deferredContext) {
strategy.setDeferredContext(deferredContext);
}
/**
* Changes the preferred strategy. Do <em>NOT</em> call this method more than once for
* a given JVM, as it will re-initialize the strategy and adversely affect any
* existing... | SecurityContextHolder.strategy = strategy;
initialize();
}
/**
* Allows retrieval of the context strategy. See SEC-1188.
* @return the configured strategy for storing the security context.
*/
public static SecurityContextHolderStrategy getContextHolderStrategy() {
return strategy;
}
/**
* Delegates t... | repos\spring-security-main\core\src\main\java\org\springframework\security\core\context\SecurityContextHolder.java | 1 |
请完成以下Java代码 | private boolean isPickingSlotRackSystem(final PickingCandidate pickingCandidate)
{
final PickingSlotId pickingSlotId = pickingCandidate.getPickingSlotId();
return pickingSlotId != null && huPickingSlotBL.isPickingRackSystem(pickingSlotId);
}
private void close(final PickingCandidate pickingCandidate)
{
try
... | {
if (failOnError)
{
throw AdempiereException.wrapIfNeeded(ex).setParameter("pickingCandidate", pickingCandidate);
}
else
{
logger.warn("Failed closing {}. Skipped", pickingCandidate, ex);
}
}
}
private void changeStatusToProcessedAndSave(final PickingCandidate pickingCandidate)
{
pick... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\ClosePickingCandidateCommand.java | 1 |
请完成以下Java代码 | public final Quantity getQtyForProductStorages(@NonNull final I_C_UOM uom)
{
return getProductStorages()
.stream()
.map(productStorage -> productStorage.getQty(uom))
.reduce(Quantity.zero(uom), Quantity::add);
}
@Override
public Quantity getQtyForProductStorages()
{
final List<IHUProductStorage> p... | {
final List<IHUProductStorage> productStorages = getProductStorages();
return productStorages.size() == 1
&& ProductId.equals(productStorages.get(0).getProductId(), productId)
&& productStorages.get(0).getQty(qty.getUOM()).compareTo(qty) == 0;
}
@Override
public boolean isSingleProductStorageMatching(@... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUStorage.java | 1 |
请完成以下Java代码 | public final class JwtTypeValidator implements OAuth2TokenValidator<Jwt> {
private final Collection<String> validTypes;
private boolean allowEmpty;
public JwtTypeValidator(Collection<String> validTypes) {
Assert.notEmpty(validTypes, "validTypes cannot be empty");
this.validTypes = new ArrayList<>(validTypes);... | public OAuth2TokenValidatorResult validate(Jwt token) {
String typ = (String) token.getHeaders().get(JoseHeaderNames.TYP);
if (this.allowEmpty && !StringUtils.hasText(typ)) {
return OAuth2TokenValidatorResult.success();
}
for (String validType : this.validTypes) {
if (validType.equalsIgnoreCase(typ)) {
... | repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtTypeValidator.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8088
spring:
ai:
openai:
base-url: https://api.openai.com/
api-key: sk-xxx
embedding:
options:
model: text-davinci-003
chat:
#指定某一个API配置(覆盖全局配置)
api-key | : sk-xxx
base-url: http://localhost:11434
options:
model: qwen:0.5b # 模型配置 | repos\springboot-demo-master\Qwen\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public void setHR_Payroll_ID (int HR_Payroll_ID)
{
if (HR_Payroll_ID < 1)
set_Value (COLUMNNAME_HR_Payroll_ID, null);
else
set_Value (COLUMNNAME_HR_Payroll_ID, Integer.valueOf(HR_Payroll_ID));
}
/** Get Payroll.
@return Payroll */
public int getHR_Payroll_ID ()
{
Integer ii = (Integer)get_Value... | {
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Valid from.
@param ValidFrom
Valid from including this date (first day)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_List.java | 1 |
请完成以下Java代码 | private AdWindowId getWindowId(final I_M_InOut inout)
{
return inout.isSOTrx() ? WINDOW_RETURN_FROM_CUSTOMER : WINDOW_RETURN_TO_VENDOR;
}
private AdMessageKey getNotificationAD_Message(final I_M_InOut inout) {return inout.isSOTrx() ? MSG_Event_RETURN_FROM_CUSTOMER_Generated : MSG_Event_RETURN_TO_VENDOR_Generated;... | return UserId.ofRepoId(inout.getUpdatedBy()); // last updated
}
//
// Fallback: notify only the creator
else
{
return UserId.ofRepoId(inout.getCreatedBy());
}
}
private void postNotifications(final List<UserNotificationRequest> notifications)
{
Services.get(INotificationBL.class).sendAfterCommit(no... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\event\ReturnInOutUserNotificationsProducer.java | 1 |
请完成以下Java代码 | public void setExternalId (final String ExternalId)
{
set_Value (COLUMNNAME_ExternalId, ExternalId);
}
@Override
public String getExternalId()
{
return get_ValueAsString(COLUMNNAME_ExternalId);
}
@Override
public void setExternallyUpdatedAt (final @Nullable java.sql.Timestamp ExternallyUpdatedAt)
{
set... | @Override
public String getSalesLineId()
{
return get_ValueAsString(COLUMNNAME_SalesLineId);
}
@Override
public void setTimePeriod (final @Nullable BigDecimal TimePeriod)
{
set_Value (COLUMNNAME_TimePeriod, TimePeriod);
}
@Override
public BigDecimal getTimePeriod()
{
final BigDecimal bd = get_ValueAs... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_Alberta_OrderedArticleLine.java | 1 |
请完成以下Java代码 | public RefundMode extractRefundMode(@NonNull final List<RefundConfig> refundConfigs)
{
final RefundMode refundMode = extractSingleElement(
refundConfigs,
RefundConfig::getRefundMode);
return refundMode;
}
public ProductId extractProductId(@NonNull final List<RefundConfig> refundConfigs)
{
final Produ... | throw new AdempiereException(MSG_REFUND_CONFIG_SAME_REFUND_MODE).markAsUserValidationError();
}
if (RefundMode.APPLY_TO_ALL_QTIES.equals(extractRefundMode(refundConfigs)))
{
// we have one IC with different configs, so those configs need to have the consistent settings
if (hasDifferentValues(refundConfigs,... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\RefundConfigs.java | 1 |
请完成以下Java代码 | public Aggregation getAggregation(final Properties ctx, final I_C_BPartner bpartner, final boolean isSOTrx, final String aggregationUsageLevel)
{
final IAggregationDAO aggregationDAO = Services.get(IAggregationDAO.class);
final AggregationId aggregationId = getInvoice_Aggregation_ID(bpartner, isSOTrx, aggregationU... | {
aggregation = aggregationFactory.getAggregationKeyBuilder(ctx, I_C_Invoice_Candidate.class, aggregationId);
}
else
{
aggregation = aggregationFactory.getDefaultAggregationKeyBuilder(ctx, I_C_Invoice_Candidate.class, true, X_C_Aggregation.AGGREGATIONUSAGELEVEL_Header);
}
return aggregation;
}
@Nulla... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceAggregationFactory.java | 1 |
请完成以下Java代码 | protected SuspendedJobEntityManager getSuspendedJobEntityManager() {
return getProcessEngineConfiguration().getSuspendedJobEntityManager();
}
protected DeadLetterJobEntityManager getDeadLetterJobEntityManager() {
return getProcessEngineConfiguration().getDeadLetterJobEntityManager();
}
... | protected HistoricTaskInstanceEntityManager getHistoricTaskInstanceEntityManager() {
return getProcessEngineConfiguration().getHistoricTaskInstanceEntityManager();
}
protected HistoricIdentityLinkEntityManager getHistoricIdentityLinkEntityManager() {
return getProcessEngineConfiguration().getHi... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\AbstractManager.java | 1 |
请完成以下Java代码 | public CaseInstanceBuilder caseDefinitionTenantId(String tenantId) {
this.caseDefinitionTenantId = tenantId;
isTenantIdSet = true;
return this;
}
public CaseInstanceBuilder caseDefinitionWithoutTenantId() {
this.caseDefinitionTenantId = null;
isTenantIdSet = true;
return this;
}
public... | }
}
// getters ////////////////////////////////////
public String getCaseDefinitionKey() {
return caseDefinitionKey;
}
public String getCaseDefinitionId() {
return caseDefinitionId;
}
public String getBusinessKey() {
return businessKey;
}
public VariableMap getVariables() {
return... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\CaseInstanceBuilderImpl.java | 1 |
请完成以下Java代码 | public void deleteTaggedAndInvalidateCache(final Collection<Integer> invoiceCandidateIds)
{
if (Check.isEmpty(invoiceCandidateIds))
{
return;
}
invoiceCandDAO.deleteRecomputeMarkersAndInvalidateCache(this, invoiceCandidateIds);
}
@Override
public int untag()
{
return invoiceCandDAO.untag(this);
}
... | }
@Override
public InvoiceCandRecomputeTagger setTaggedWith(@Nullable final InvoiceCandRecomputeTag tag)
{
_taggedWith = tag;
return this;
}
@Override
public InvoiceCandRecomputeTagger setTaggedWithNoTag()
{
return setTaggedWith(InvoiceCandRecomputeTag.NULL);
}
@Override
public IInvoiceCandRecomputeT... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandRecomputeTagger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static final class SpringResource implements net.shibboleth.shared.resource.Resource {
private final Resource resource;
SpringResource(Resource resource) {
this.resource = resource;
}
@Override
public boolean exists() {
return this.resource.exists();
}
@Override
public boolea... | throws IOException {
return new SpringResource(this.resource.createRelative(relativePath));
}
@Override
public String getFilename() {
return this.resource.getFilename();
}
@Override
public String getDescription() {
return this.resource.getDescription();
}
}
}
private static fin... | repos\spring-security-main\saml2\saml2-service-provider\src\opensaml5Main\java\org\springframework\security\saml2\provider\service\registration\OpenSaml5AssertingPartyMetadataRepository.java | 2 |
请完成以下Java代码 | public class MigratingIncident implements MigratingInstance {
protected IncidentEntity incident;
protected ScopeImpl targetScope;
protected String targetJobDefinitionId;
public MigratingIncident(IncidentEntity incident, ScopeImpl targetScope) {
this.incident = incident;
this.targetScope = targetScope;... | incident.setJobDefinitionId(targetJobDefinitionId);
migrateHistory();
}
protected void migrateHistory() {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
if (historyLevel.isHistoryEventProduced(HistoryEventTypes.INCIDENT_MIGRATE, this)) {
HistoryEventProce... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingIncident.java | 1 |
请完成以下Java代码 | public boolean isMandatory()
{
return IsMandatory;
}
public boolean isKey()
{
return IsKey;
}
public boolean isParent()
{
return IsParent;
}
public boolean isStaleable()
{
return IsStaleable;
}
public boolean isLookup()
{
return org.compiere.util.DisplayType.isLookup(displayType);
}
public... | }
private static Optional<String> computeReferencedTableName(
final int displayType,
@Nullable final TableName adReferenceValueTableName)
{
// Special lookups (Location, Locator etc)
final String refTableName = DisplayType.getTableName(displayType);
if (refTableName != null)
{
return Optional.of(ref... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\POInfoColumn.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ObjectName getObjectName(Object managedBean, @Nullable String beanKey) throws MalformedObjectNameException {
ObjectName name = super.getObjectName(managedBean, beanKey);
if (this.ensureUniqueRuntimeObjectNames) {
return JmxUtils.appendIdentityToObjectName(name, managedBean);
}
if (parentContextContain... | Assert.state(beanKey != null, "'beanKey' must not be null");
parent.getBean(beanKey);
return true;
}
catch (BeansException ex) {
return parentContextContainsSameBean(context.getParent(), beanKey);
}
}
private ObjectName appendToObjectName(ObjectName name, String key, String value)
throws MalformedO... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\jmx\ParentAwareNamingStrategy.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int hashCode() {
return Objects.hash(maintenanceCode, maintenanceInterval, lastServiceDate, nextServiceDate);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeviceToCreateMaintenances {\n");
sb.append(" maintenanceCode: ").append(to... | return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\DeviceToCreateMaintenances.java | 2 |
请完成以下Java代码 | public void setFilterChainDecorator(WebFilterChainDecorator filterChainDecorator) {
Assert.notNull(filterChainDecorator, "filterChainDecorator cannot be null");
this.filterChainDecorator = filterChainDecorator;
}
/**
* A strategy for decorating the provided filter chain with one that accounts for the
* {@lin... | /**
* {@inheritDoc}
*/
@Override
public WebFilterChain decorate(WebFilterChain original) {
return original;
}
/**
* {@inheritDoc}
*/
@Override
public WebFilterChain decorate(WebFilterChain original, List<WebFilter> filters) {
return new DefaultWebFilterChain(original::filter, filters);
... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\WebFilterChainProxy.java | 1 |
请完成以下Java代码 | public int size()
{
assertNotAll();
return documentIds.size();
}
public boolean contains(final DocumentId documentId)
{
return all || documentIds.contains(documentId);
}
public Set<DocumentId> toSet()
{
assertNotAll();
return documentIds;
}
public <T> ImmutableSet<T> toSet(@NonNull final Function<... | return toSet(DocumentId::toJson);
}
public SelectionSize toSelectionSize()
{
if (isAll())
{
return SelectionSize.ofAll();
}
return SelectionSize.ofSize(size());
}
public DocumentIdsSelection addAll(@NonNull final DocumentIdsSelection documentIdsSelection)
{
if (this.isEmpty())
{
return documen... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DocumentIdsSelection.java | 1 |
请完成以下Java代码 | public class MRefTable extends X_AD_Ref_Table
{
/**
*
*/
private static final long serialVersionUID = 9123965213307214868L;
/**
* Standard Constructor
* @param ctx context
* @param AD_Reference_ID id warning if you are referring to reference list or table type should be used AD_Reference_Value_ID
* @p... | // metas: begin
private static final CCache<Integer, MRefTable> s_cache = new CCache<Integer, MRefTable>(Table_Name, 50, 0);
public static MRefTable get(Properties ctx, int AD_Reference_ID)
{
if (AD_Reference_ID <= 0)
return null;
MRefTable retValue = s_cache.get(AD_Reference_ID);
if (retValue != null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MRefTable.java | 1 |
请完成以下Java代码 | public Void execute(CommandContext commandContext) {
ensureNotNull("jobId", jobId);
final JobEntity job = commandContext.getDbEntityManager().selectById(JobEntity.class, jobId);
final ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
final IdentitySer... | // if the job is called by the job executor then set the tenant id of the job
// as authenticated tenant to enable tenant checks
String tenantId = job.getTenantId();
if (tenantId != null) {
identityService.setAuthentication(null, null, Collections.singletonList(tenantId));
}
}
t... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\ExecuteJobsCmd.java | 1 |
请完成以下Java代码 | public int getC_Project_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Project_ID);
}
/**
* C_Project_Role AD_Reference_ID=540905
* Reference name: c_project_role
*/
public static final int C_PROJECT_ROLE_AD_Reference_ID=540905;
/** Project Manager = PM */
public static final String C_PROJECT_ROLE_ProjectMa... | }
@Override
public boolean isAccommodationBooking()
{
return get_ValueAsBoolean(COLUMNNAME_IsAccommodationBooking);
}
@Override
public org.compiere.model.I_R_Status getR_Status()
{
return get_ValueAsPO(COLUMNNAME_R_Status_ID, org.compiere.model.I_R_Status.class);
}
@Override
public void setR_Status(fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_User.java | 1 |
请完成以下Java代码 | public class Dijkstra
{
public static List<Vertex> compute(Graph graph)
{
List<Vertex> resultList = new LinkedList<Vertex>();
Vertex[] vertexes = graph.getVertexes();
List<EdgeFrom>[] edgesTo = graph.getEdgesTo();
double[] d = new double[vertexes.length];
Arrays.fill(d, D... | if (d[p.vertex] < p.cost) continue;
for (EdgeFrom edgeFrom : edgesTo[p.vertex])
{
if (d[edgeFrom.from] > d[p.vertex] + edgeFrom.weight)
{
d[edgeFrom.from] = d[p.vertex] + edgeFrom.weight;
que.add(new State(d[edgeFrom.from], ... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\algorithm\Dijkstra.java | 1 |
请完成以下Java代码 | public String getMachineId() {
return machineId;
}
public ClusterGroupEntity setMachineId(String machineId) {
this.machineId = machineId;
return this;
}
public String getIp() {
return ip;
}
public ClusterGroupEntity setIp(String ip) {
this.ip = ip;
... | public Boolean getBelongToApp() {
return belongToApp;
}
public ClusterGroupEntity setBelongToApp(Boolean belongToApp) {
this.belongToApp = belongToApp;
return this;
}
@Override
public String toString() {
return "ClusterGroupEntity{" +
"machineId='" + mac... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\cluster\ClusterGroupEntity.java | 1 |
请完成以下Java代码 | public void setCertificateVerifier(Consumer<OAuth2ClientAuthenticationContext> certificateVerifier) {
Assert.notNull(certificateVerifier, "certificateVerifier cannot be null");
this.certificateVerifier = certificateVerifier;
}
private void verifyX509Certificate(OAuth2ClientAuthenticationContext clientAuthenticat... | String expectedSubjectDN = registeredClient.getClientSettings().getX509CertificateSubjectDN();
if (!StringUtils.hasText(expectedSubjectDN)
|| !clientCertificate.getSubjectX500Principal().getName().equals(expectedSubjectDN)) {
throwInvalidClient("x509_certificate_subject_dn");
}
}
private static void throw... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\X509ClientCertificateAuthenticationProvider.java | 1 |
请完成以下Java代码 | public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
@Override
public void setSeqNo (int SeqNo)... | set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
@Override
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_SortPref_Line_Product.java | 1 |
请完成以下Java代码 | private static void deepCopyInto(final Map<String, Object> target, final Map<String, Object> source)
{
for (Map.Entry<String, Object> entry : source.entrySet())
{
final String key = entry.getKey();
final Object valueOld = target.get(key);
final Object valueNew = combineValue(valueOld, entry.getValue());
... | }
else
{
return source;
}
}
public JsonMessages toJson()
{
return JsonMessages.builder()
.language(adLanguage)
.messages(map)
.build();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\AdMessagesTree.java | 1 |
请完成以下Java代码 | public class ToStringSerializer<T> implements Serializer<T> {
/**
* Kafka config property for enabling/disabling adding type headers.
*/
public static final String ADD_TYPE_INFO_HEADERS = "spring.message.add.type.headers";
/**
* Header for the type of key.
*/
public static final String KEY_TYPE = "spring.... | * Get the addTypeInfo property.
* @return the addTypeInfo
*/
public boolean isAddTypeInfo() {
return this.addTypeInfo;
}
/**
* Set to false to disable adding type info headers.
* @param addTypeInfo true to add headers
*/
public void setAddTypeInfo(boolean addTypeInfo) {
this.addTypeInfo = addTypeInf... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\ToStringSerializer.java | 1 |
请完成以下Java代码 | public ZonedDateTime getDatePromised()
{
final ZoneId timeZone = orgDAO.getTimeZone(OrgId.ofRepoId(order.getAD_Org_ID()));
return TimeUtil.asZonedDateTime(order.getDatePromised(), timeZone);
}
public OrderFactory shipBPartner(
@NonNull final BPartnerId bpartnerId,
@Nullable final BPartnerLocationId bpartn... | order.setSalesRep_ID(UserId.toRepoId(salesRepId));
return this;
}
public OrderFactory projectId(@Nullable final ProjectId projectId)
{
assertNotBuilt();
order.setC_Project_ID(ProjectId.toRepoId(projectId));
return this;
}
public OrderFactory campaignId(final int campaignId)
{
assertNotBuilt();
order... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderFactory.java | 1 |
请完成以下Java代码 | public void setMargin (java.math.BigDecimal Margin)
{
set_Value (COLUMNNAME_Margin, Margin);
}
/** Get Margin %.
@return Margin for a product as a percentage
*/
@Override
public java.math.BigDecimal getMargin ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Margin);
if (bd == null)
return Bi... | {
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OfferAmt);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Menge.
@param Qty
Quantity
*/
@Override
public void setQty (java.math.BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Menge.
@return Quantity
*/
@Ove... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQLineQty.java | 1 |
请完成以下Java代码 | public class DbCallStats {
private final TenantId tenantId;
private final ConcurrentMap<String, MethodCallStats> methodStats = new ConcurrentHashMap<>();
private final AtomicInteger successCalls = new AtomicInteger();
private final AtomicInteger failureCalls = new AtomicInteger();
public void onMe... | methodCallStats.getFailures().incrementAndGet();
}
}
public DbCallStatsSnapshot snapshot() {
return DbCallStatsSnapshot.builder()
.tenantId(tenantId)
.totalSuccess(successCalls.get())
.totalFailure(failureCalls.get())
.methodStats(... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\aspect\DbCallStats.java | 1 |
请完成以下Java代码 | public class HibernateUtil {
private static SessionFactory sessionFactory;
private HibernateUtil() {
}
public static SessionFactory getSessionFactory() {
if (sessionFactory == null) {
sessionFactory = buildSessionFactory();
}
return sessionFactory;
}
privat... | } catch (IOException ex) {
throw new ExceptionInInitializerError(ex);
}
}
private static ServiceRegistry configureServiceRegistry() throws IOException {
Properties properties = getProperties();
return new StandardServiceRegistryBuilder().applySettings(properties).build();
... | repos\tutorials-master\persistence-modules\hibernate-queries\src\main\java\com\baeldung\hibernate\criteriaquery\HibernateUtil.java | 1 |
请完成以下Spring Boot application配置 | management.endpoint.health.probes.enabled=true
management.health.livenessState.enabled=true
management.health.readinessState.enabled=true
management.endpoint.health.show-details=always
management.endpoint.health.status.http-mapping.down=500
management.endpoint.health.status.http-mapping.out_of_service=503
management.en... | s is my first spring boot application G1
info.app.version=1.0.0
info.java-vendor = ${java.specification.vendor}
management.endpoints.web.exposure.include=*
management.endpoint.shutdown.enabled=true | repos\tutorials-master\spring-boot-modules\spring-boot-actuator\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | private void schedulerAdd(String id, String jobClassName, String cronExpression, String parameter) {
try {
// 启动调度器
scheduler.start();
// 构建job信息
JobDetail jobDetail = JobBuilder.newJob(getClass(jobClassName).getClass()).withIdentity(id).usingJobData("parameter", parameter).build();
// 表达式调度构建器(即任务执行... | * @param id
*/
private void schedulerDelete(String id) {
try {
scheduler.pauseTrigger(TriggerKey.triggerKey(id));
scheduler.unscheduleJob(TriggerKey.triggerKey(id));
scheduler.deleteJob(JobKey.jobKey(id));
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new JeecgBootException("删除定时任务失败... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\quartz\service\impl\QuartzJobServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ConditionConfig {
/**
* 该Abc class位于类路径上时
*/
@ConditionalOnClass(DynamicAttrConfig.class)
@Bean
public String abc() {
System.err.println("ConditionalOnClass true");
return "";
}
@Bean
public DynamicAttrConfig createAbcBean() {
return new DynamicAttrConfig();
}
//
/**
* 存在Abc类的实例时
... | */
@ConditionalOnProperty(value = {"spring.activemq.switch"}, matchIfMissing = false)
@Bean
public String property() {
System.err.println("property is true");
return "";
}
/**
* 打印容器里的所有bean name (box name 为方法名)
* @param appContext
* @return
*/
@Bean
public CommandLineRunner run(ApplicationContext ... | repos\spring-boot-quick-master\quick-dynamic-bean\src\main\java\com\dynamic\bean\config\ConditionConfig.java | 2 |
请完成以下Java代码 | private Stream<InventoryLineHU> streamLineHUs()
{
return lines.stream().flatMap(line -> line.getInventoryLineHUs().stream());
}
public ImmutableSet<HuId> getHuIds()
{
return InventoryLineHU.extractHuIds(streamLineHUs());
}
public Inventory assigningTo(@NonNull final UserId newResponsibleId)
{
return assi... | if (!UserId.equals(responsibleId, calledId))
{
throw new AdempiereException("No access");
}
}
public Stream<InventoryLine> streamLines(@Nullable final InventoryLineId onlyLineId)
{
return onlyLineId != null
? Stream.of(getLineById(onlyLineId))
: lines.stream();
}
public Set<LocatorId> getLocator... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\Inventory.java | 1 |
请完成以下Java代码 | public static int divideListElements(List<Integer> values, Integer divider) {
return values.stream()
.reduce(0, (a, b) -> {
try {
return a / divider + b / divider;
} catch (ArithmeticException e) {
LOGGER.log... | try {
result = value / factor;
} catch (ArithmeticException e) {
LOGGER.log(Level.INFO, "Arithmetic Exception: Division by Zero");
}
return result;
}
private static int applyFunction(BiFunction<Integer, Integer, Integer> function, int a, int b) {
try ... | repos\tutorials-master\core-java-modules\core-java-streams-7\src\main\java\com\baeldung\streams\reduce\utilities\NumberUtils.java | 1 |
请完成以下Java代码 | public void setAnonymousAuthorizedClientRepository(
ServerOAuth2AuthorizedClientRepository anonymousAuthorizedClientRepository) {
Assert.notNull(anonymousAuthorizedClientRepository, "anonymousAuthorizedClientRepository cannot be null");
this.anonymousAuthorizedClientRepository = anonymousAuthorizedClientReposito... | }
return this.anonymousAuthorizedClientRepository.saveAuthorizedClient(authorizedClient, principal, exchange);
}
@Override
public Mono<Void> removeAuthorizedClient(String clientRegistrationId, Authentication principal,
ServerWebExchange exchange) {
if (this.isPrincipalAuthenticated(principal)) {
return th... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\server\AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository.java | 1 |
请完成以下Java代码 | public void addFile(JarOutputStream target, String rootPath, String source) throws IOException {
BufferedInputStream in = null;
String remaining = "";
if (rootPath.endsWith(File.separator))
remaining = source.substring(rootPath.length());
else
remaining = source.s... | public JarOutputStream openJar(String jarFile) throws IOException {
JarOutputStream target = new JarOutputStream(new FileOutputStream(jarFile), manifest);
return target;
}
public void setMainClass(String mainFQCN) {
if (mainFQCN != null && !mainFQCN.equals(""))
manifest.getM... | repos\tutorials-master\core-java-modules\core-java-jar\src\main\java\com\baeldung\createjar\JarTool.java | 1 |
请完成以下Java代码 | public Pet getPet(String name, boolean ignoreNew) {
for (Pet pet : getPets()) {
String compName = pet.getName();
if (compName != null && compName.equalsIgnoreCase(name)) {
if (!ignoreNew || !pet.isNew()) {
return pet;
}
}
}
return null;
}
@Override
public String toString() {
return new... | * @param petId the identifier of the {@link Pet}, must not be {@literal null}.
* @param visit the visit to add, must not be {@literal null}.
*/
public void addVisit(Integer petId, Visit visit) {
Assert.notNull(petId, "Pet identifier must not be null!");
Assert.notNull(visit, "Visit must not be null!");
Pet... | repos\spring-petclinic-main\src\main\java\org\springframework\samples\petclinic\owner\Owner.java | 1 |
请完成以下Java代码 | public void setPriorityRule (final @Nullable java.lang.String PriorityRule)
{
set_Value (COLUMNNAME_PriorityRule, PriorityRule);
}
@Override
public java.lang.String getPriorityRule()
{
return get_ValueAsString(COLUMNNAME_PriorityRule);
}
@Override
public void setReferenceNo (final @Nullable java.lang.Str... | @Override
public void setVolume (final @Nullable BigDecimal Volume)
{
set_Value (COLUMNNAME_Volume, Volume);
}
@Override
public BigDecimal getVolume()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public org.compiere.model.I_C_L... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Header_v.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ServiceRepairProjectTask withUpdatedStatus()
{
final ServiceRepairProjectTaskStatus newStatus = computeStatus();
return !newStatus.equals(getStatus())
? toBuilder().status(newStatus).build()
: this;
}
private ServiceRepairProjectTaskStatus computeStatus()
{
final @NonNull ServiceRepairProjectT... | return ServiceRepairProjectTaskStatus.IN_PROGRESS;
}
}
public ServiceRepairProjectTask withRepairOrderId(@NonNull final PPOrderId repairOrderId)
{
return toBuilder()
.repairOrderId(repairOrderId)
.build()
.withUpdatedStatus();
}
public ServiceRepairProjectTask withRepairOrderDone(
@Nullable fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\model\ServiceRepairProjectTask.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected String getDeploymentMode() {
return DEPLOYMENT_MODE;
}
@Override
protected void deployResourcesInternal(String deploymentNameHint, Resource[] resources, ProcessEngine engine) {
RepositoryService repositoryService = engine.getRepositoryService();
// Create a single deploym... | try {
deploymentBuilder.deploy();
} catch (RuntimeException e) {
if (isThrowExceptionOnDeploymentFailure()) {
throw e;
} else {
LOGGER.warn("Exception while autodeploying process definitions. "
+ "This exception can be ignor... | repos\flowable-engine-main\modules\flowable-spring\src\main\java\org\flowable\spring\configurator\DefaultAutoDeploymentStrategy.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CustomerMapping _id(UUID _id) {
this._id = _id;
return this;
}
/**
* Alberta-Id
* @return _id
**/
@Schema(example = "a4adecb6-126a-4fa6-8fac-e80165ac4264", required = true, description = "Alberta-Id")
public UUID getId() {
return _id;
}
public void setId(UUID _id) {
this._i... | @Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CustomerMapping customerMapping = (CustomerMapping) o;
return Objects.equals(this._id, customerMapping._id) &&
Objects.equals... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\CustomerMapping.java | 2 |
请完成以下Java代码 | protected ObjectMapper getObjectMapper() {
return JsonMapper.builder()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.build();
}
private String trimMarkdown(String text) {
if (text.startsWith("```json") && text.endsWith("```")) {
text = tex... | JacksonModule jacksonModule = new JacksonModule();
SchemaGeneratorConfig config = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, OptionPreset.PLAIN_JSON)
.with(jacksonModule)
.build();
SchemaGenerator generator = new SchemaGenerator(config);
... | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springaistructuredoutput\converters\GenericMapOutputConverter.java | 1 |
请完成以下Spring Boot application配置 | events:
queues:
shipping:
simple-pojo-conversion-queue: shipping_pojo_conversion_queue
custom-object-mapper-queue: shipping_custom_object_mapper_queue
subclass-deserialization-queue: subclass_deserialization_queue
headers:
type | s:
shipping:
header-name: SHIPPING_TYPE
international: INTERNATIONAL
domestic: DOMESTIC | repos\tutorials-master\spring-cloud-modules\spring-cloud-aws-v3\src\main\resources\application-shipping.yaml | 2 |
请完成以下Java代码 | public void onNew(final ICalloutRecord calloutRecord)
{
final I_SAP_GLJournalLine glJournalLine = calloutRecord.getModel(I_SAP_GLJournalLine.class);
final SAPGLJournalId glJournalId = SAPGLJournalId.ofRepoId(glJournalLine.getSAP_GLJournal_ID());
final SeqNo seqNo = glJournalService.getNextSeqNo(glJournalId);
g... | updateAmtAcct(glJournalLine);
}
private void updateAmtAcct(final I_SAP_GLJournalLine glJournalLine)
{
final SAPGLJournalCurrencyConversionCtx conversionCtx = getConversionCtx(glJournalLine);
final Money amtAcct = glJournalService.getCurrencyConverter().convertToAcctCurrency(glJournalLine.getAmount(), conversion... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\callout\SAP_GLJournalLine.java | 1 |
请完成以下Java代码 | public static class SuspensionStateUtil {
public static void setSuspensionState(ProcessDefinitionEntity processDefinitionEntity, SuspensionState state) {
if (processDefinitionEntity.getSuspensionState() == state.getStateCode()) {
throw new ActivitiException(
"Can... | );
}
taskEntity.setSuspensionState(state.getStateCode());
dispatchStateChangeEvent(taskEntity, state);
}
protected static void dispatchStateChangeEvent(Object entity, SuspensionState state) {
if (Context.getCommandContext() != null && Context.getCommandCo... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\SuspensionState.java | 1 |
请完成以下Java代码 | public class DefaultDynamicStateManager extends AbstractDynamicStateManager implements DynamicStateManager {
@Override
public void moveExecutionState(ChangeActivityStateBuilderImpl changeActivityStateBuilder, CommandContext commandContext) {
List<MoveExecutionEntityContainer> moveExecutionEntityContain... | doMoveExecutionState(processInstanceChangeState, commandContext);
}
@Override
protected Map<String, List<ExecutionEntity>> resolveActiveEmbeddedSubProcesses(String processInstanceId, CommandContext commandContext) {
ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEnti... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\dynamic\DefaultDynamicStateManager.java | 1 |
请完成以下Java代码 | public static String saveErrorTxtByList(List<String> msg, String name) {
Date d = new Date();
String saveDir = "logs" + File.separator + DateUtils.yyyyMMdd.get().format(d) + File.separator;
String saveFullDir = uploadPath + File.separator + saveDir;
File saveFile = new File(saveFullDir)... | bw.write("第" + arr[0] + "行:" + arr[1]);
} else {
bw.write(s);
}
//bw.newLine();
bw.write("\r\n");
}
//释放资源
bw.flush();
bw.close();
} catch (Exception e) {
log.info("exc... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\PmsUtil.java | 1 |
请完成以下Java代码 | public void processSave(final IHUContext huContext, final I_M_HU_Trx_Attribute trxAttribute, final Object referencedModel)
{
if (!HUConstants.DEBUG_07277_processHUTrxAttribute)
{
return; // FIXME debuging
}
final I_M_HU hu = InterfaceWrapperHelper.create(referencedModel, I_M_HU.class);
final IHUAttribut... | @Override
public void processDrop(final IHUContext huContext, final I_M_HU_Trx_Attribute huTrxAttribute, final Object referencedModel)
{
final IHUAttributesDAO huAttributesDAO = huContext.getHUAttributeStorageFactory().getHUAttributesDAO();
final I_M_HU_Attribute huAttributeExisting = retrieveHUAttribute(huAttrib... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\spi\impl\HUTrxAttributeProcessor_HU.java | 1 |
请完成以下Java代码 | private static List<Geometry> buildPolygonsFromJson(JsonArray polygonsJsonArray) {
List<Geometry> polygons = new LinkedList<>();
for (JsonElement polygonJsonArray : polygonsJsonArray) {
polygons.add(
buildPolygonFromCoordinates(parseCoordinates(polygonJsonArray.getAsJson... | List<Coordinate> result = new LinkedList<>();
for (JsonElement coords : coordinatesJson) {
double x = coords.getAsJsonArray().get(0).getAsDouble();
double y = coords.getAsJsonArray().get(1).getAsDouble();
result.add(new Coordinate(x, y));
}
if (result.size()... | repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\geo\GeoUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CommonResult<CommonPage<PmsProductAttribute>> getList(@PathVariable Long cid,
@RequestParam(value = "type") Integer type,
@RequestParam(value = "pageSize", defaultValue = "5") Integer... | PmsProductAttribute productAttribute = productAttributeService.getItem(id);
return CommonResult.success(productAttribute);
}
@ApiOperation("批量删除商品属性")
@RequestMapping(value = "/delete", method = RequestMethod.POST)
@ResponseBody
public CommonResult delete(@RequestParam("ids") List<Long> ids... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\PmsProductAttributeController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ThreadPoolTaskExecutor threadPoolTaskExecutor() {
// 创建 TaskExecutorBuilder 对象
TaskExecutorBuilder builder = createTskExecutorBuilder(this.taskExecutionProperties());
// 创建 ThreadPoolTaskExecutor 对象
return builder.build();
}
}
private static TaskE... | builder = builder.maxPoolSize(pool.getMaxSize());
builder = builder.allowCoreThreadTimeOut(pool.isAllowCoreThreadTimeout());
builder = builder.keepAlive(pool.getKeepAlive());
// Shutdown 属性
TaskExecutionProperties.Shutdown shutdown = properties.getShutdown();
builder = builder.aw... | repos\SpringBoot-Labs-master\lab-29\lab-29-async-two\src\main\java\cn\iocoder\springboot\lab29\asynctask\config\AsyncConfig.java | 2 |
请完成以下Java代码 | protected List<String> extractCandidates(String str) {
return Arrays.asList(str.split("[\\s]*,[\\s]*"));
}
protected Expression getActiveValue(Expression originalValue, String propertyName, ObjectNode taskElementProperties) {
Expression activeValue = originalValue;
if (taskElementProper... | activeValues.add(expressionManager.createExpression(valueNode.asString()));
}
}
}
}
return activeValues;
}
// getters and setters //////////////////////////////////////////////////////
public TaskDefinition getTaskDefinition() {
retur... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\UserTaskActivityBehavior.java | 1 |
请完成以下Java代码 | public boolean hasAttributes()
{
return false;
}
@Override
public IViewRowAttributes getAttributes() throws EntityNotFoundException
{
throw new EntityNotFoundException("Row does not support attributes");
}
@Override
public ViewId getIncludedViewId()
{
return includedViewId;
}
public ShipmentSchedule... | return shipmentScheduleId;
}
public Optional<OrderLineId> getSalesOrderLineId()
{
return salesOrderLineId;
}
public ProductId getProductId()
{
return product != null ? ProductId.ofRepoIdOrNull(product.getIdAsInt()) : null;
}
public Quantity getQtyOrderedWithoutPicked()
{
return qtyOrdered.subtract(qty... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\PackageableRow.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isIncludeUnsampled() {
return this.includeUnsampled;
}
public void setIncludeUnsampled(boolean includeUnsampled) {
this.includeUnsampled = includeUnsampled;
}
public Duration getTimeout() {
return this.timeout;
}
public void setTimeout(Duration timeout) {
this.timeout = timeout... | public void setMaxQueueSize(int maxQueueSize) {
this.maxQueueSize = maxQueueSize;
}
public Duration getScheduleDelay() {
return this.scheduleDelay;
}
public void setScheduleDelay(Duration scheduleDelay) {
this.scheduleDelay = scheduleDelay;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-opentelemetry\src\main\java\org\springframework\boot\micrometer\tracing\opentelemetry\autoconfigure\OpenTelemetryTracingProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UserServiceImpl implements UserService {
private final UserRepository userRepository;
private final AddressRepository addressRepository;
public UserServiceImpl(UserRepository userRepository,
AddressRepository addressRepository) {
this.userRepository = userRe... | @Override
public Collection<UserEntity> getAll() {
return userRepository.findAll();
}
@Transactional
@Override
public void deleteUser(String id) {
UserEntity userEntity = new UserEntity();
userEntity.setId(id);
userRepository.delete(userEntity);
}
private Ad... | repos\spring-examples-java-17\spring-data\src\main\java\itx\examples\springdata\service\UserServiceImpl.java | 2 |
请完成以下Java代码 | public I_M_HU_LUTU_Configuration createAndEdit(final Function<I_M_HU_LUTU_Configuration, I_M_HU_LUTU_Configuration> lutuConfigurationEditor)
{
final ILUTUConfigurationEditor editor = startEditing();
editor.updateFromModel();
if (lutuConfigurationEditor != null)
{
editor.edit(lutuConfigurationEditor);
if... | handler.setCurrentLUTUConfiguration(documentLine, lutuConfiguration);
// Save it
handler.save(documentLine);
}
protected I_M_HU_LUTU_Configuration createNewLUTUConfiguration()
{
final T documentLine = getDocumentLine();
return handler.createNewLUTUConfiguration(documentLine);
}
private T getDocumentLine... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\DocumentLUTUConfigurationManager.java | 1 |
请完成以下Java代码 | public static SimpleSequence create()
{
return new SimpleSequence(0, 10);
}
/**
* The first invocation of {@link #next()} will return {code initial + 10}.
*/
public static SimpleSequence createWithInitial(final int initial)
{
return new SimpleSequence(initial, 10);
}
@Builder
private SimpleSequence(fi... | this.initial = initial;
Check.errorIf(increment == 0, "The given increment may not be zero");
this.increment = increment;
current = initial;
}
public int next()
{
current = current + increment;
return current;
}
} | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-util\src\main\java\de\metas\common\util\SimpleSequence.java | 1 |
请在Spring Boot框架中完成以下Java代码 | ServerRSocketConnector serverRSocketConnector(ServerRSocketMessageHandler messageHandler) {
return new ServerRSocketConnector(messageHandler);
}
}
@Configuration(proxyBeanMethods = false)
protected static class IntegrationRSocketClientConfiguration {
@Bean
@ConditionalOnMissingBean
@Conditional... | */
static class RemoteRSocketServerAddressConfigured extends AnyNestedCondition {
RemoteRSocketServerAddressConfigured() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnProperty("spring.integration.rsocket.client.uri")
static class WebSocketAddressConfigured {
}
@Condition... | repos\spring-boot-4.0.1\module\spring-boot-integration\src\main\java\org\springframework\boot\integration\autoconfigure\IntegrationAutoConfiguration.java | 2 |
请完成以下Java代码 | public void setJvmRoute(String jvmRoute) {
this.jvmRoute = "." + jvmRoute;
}
/**
* Set if the Base64 encoding of cookie value should be used. This is valuable in
* order to support <a href="https://tools.ietf.org/html/rfc6265">RFC 6265</a> which
* recommends using Base 64 encoding to the cookie value.
* @p... | return matcher.group(1);
}
}
return null;
}
private String getCookiePath(HttpServletRequest request) {
if (this.cookiePath == null) {
String contextPath = request.getContextPath();
return (contextPath != null && contextPath.length() > 0) ? contextPath : "/";
}
return this.cookiePath;
}
/**
* ... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\DefaultCookieSerializer.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.