instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class JsonDataEntry extends BasicKvEntry {
private final String value;
public JsonDataEntry(String key, String value) {
super(key);
this.value = value;
}
@Override
public DataType getDataType() {
return DataType.JSON;
}
@Override
public Optional<String>... | }
@Override
public Object getValue() {
return value;
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), value);
}
@Override
public String toString() {
return "JsonDataEntry{" +
"value=" + value +
"} " + sup... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\kv\JsonDataEntry.java | 1 |
请完成以下Java代码 | public FullName getFullName() {
return fullName;
}
public void setFullName(FullName fullName) {
this.fullName = fullName;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Date getBirthday() {
return b... | this.clothes = clothes;
}
public List<Person> getFriends() {
return friends;
}
public void setFriends(List<Person> friends) {
this.friends = friends;
}
@Override
public String toString() {
StringBuilder str = new StringBuilder("Person [name=" + name + ", fullName="... | repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\benchmark\json\model\Person.java | 1 |
请完成以下Java代码 | public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
} | public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
} | repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonschemageneration\recursive\AuthoredArticle.java | 1 |
请完成以下Java代码 | public class SendEventServiceTask extends ServiceTask {
protected String eventType;
protected String triggerEventType;
protected boolean sendSynchronously;
protected List<IOParameter> eventInParameters = new ArrayList<>();
protected List<IOParameter> eventOutParameters = new ArrayList<>();
pub... | }
@Override
public SendEventServiceTask clone() {
SendEventServiceTask clone = new SendEventServiceTask();
clone.setValues(this);
return clone;
}
public void setValues(SendEventServiceTask otherElement) {
super.setValues(otherElement);
setEventType(otherElement.... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\SendEventServiceTask.java | 1 |
请完成以下Java代码 | public void updateAfterReplacement() {
super.updateAfterReplacement();
Collection<Reference> incomingReferences = getIncomingReferencesByType(SequenceFlow.class);
for (Reference<?> reference : incomingReferences) {
for (ModelElementInstance sourceElement : reference.findReferenceSourceElements(this)) ... | camundaAsyncBefore.setValue(this, isCamundaAsyncBefore);
}
public boolean isCamundaAsyncAfter() {
return camundaAsyncAfter.getValue(this);
}
public void setCamundaAsyncAfter(boolean isCamundaAsyncAfter) {
camundaAsyncAfter.setValue(this, isCamundaAsyncAfter);
}
public boolean isCamundaExclusive()... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\FlowNodeImpl.java | 1 |
请完成以下Java代码 | public final class CopyTemplate
{
@Getter @NonNull private final String tableName;
@Getter @Nullable private final String keyColumnName;
@NonNull private final ImmutableMap<String, CopyTemplateColumn> columnsByColumnName;
@Getter @NonNull private final ImmutableList<CopyTemplate> childTemplates;
//
// Child/inc... | {
throw new AdempiereException("Column `" + columnName + "` not found in " + this);
}
return column;
}
private Optional<CopyTemplateColumn> getColumnIfExists(final String columnName)
{
return Optional.ofNullable(columnsByColumnName.get(columnName));
}
public ValueToCopyResolved getValueToCopy(@NonNull V... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\copy_with_details\template\CopyTemplate.java | 1 |
请完成以下Java代码 | public static String subscribeMessage(String FromUserName, String ToUserName) {
String message = "Hi!我的小伙伴~欢迎关注人事情报科!\n" +
"\n" +
"快速搜索查看2000万人才简历,点击<a href=\"http://wx.rchezi.com\">【搜索】</a>\n" +
"\n" +
"与HR和猎头加好友交换简历~~点击 <a href=\"http://www.rchez... | * @param mediaId
* @return
*/
public static String reversalVoiceMessage(String fromUserName, String toUserName, String mediaId) {
VoiceMessage voiceMessage = new VoiceMessage();
voiceMessage.setToUserName(fromUserName);
voiceMessage.setFromUserName(toUserName);
voiceMessage... | repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\utils\MessageUtil.java | 1 |
请完成以下Java代码 | public void setC_Order_ID (final int C_Order_ID)
{
if (C_Order_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Order_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Order_ID, C_Order_ID);
}
@Override
public int getC_Order_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Order_ID);
}
@Override
public void setIsN... | @Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM()
{
return get_ValueAsPO(COLUMNNAME_PP_Product_BOM_ID, org.eevolution.model.I_PP_Product_BOM.class);
}
@Override
public void setPP_Product_B... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_CompensationGroup.java | 1 |
请完成以下Java代码 | public void update(int[] goldIndex, int[] predictIndex, double[] total, int[] timestamp, int current)
{
for (int i = 0; i < goldIndex.length; ++i)
{
if (goldIndex[i] == predictIndex[i])
continue;
else
{
update(goldIndex[i], 1, total... | * @param total 权值向量总和
* @param timestamp 每个权值上次更新的时间戳
* @param current 当前时间戳
*/
private void update(int index, float value, double[] total, int[] timestamp, int current)
{
int passed = current - timestamp[index];
total[index] += passed * parameter[index];
parameter[i... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\model\AveragedPerceptron.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonQuantity
{
@NonNull BigDecimal value;
@NonNull String uomCode; // ISO or system UOM code, e.g. "PCE"
@NonNull
@JsonCreator
public static JsonQuantity parseString(@NonNull final String string)
{
final List<String> parts = Splitter.on(" ").trimResults().omitEmptyStrings().splitToList(string);
... | .uomCode(parts.get(1))
.build();
}
catch (final Exception ex)
{
throw new RuntimeException("Cannot parse " + string + " to JsonQuantity", ex);
}
}
@Override
public String toString() {return toJson();}
@JsonValue
public String toJson() {return value + " " + uomCode;}
} | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-delivery\src\main\java\de\metas\common\delivery\v1\json\JsonQuantity.java | 2 |
请完成以下Java代码 | public void close(final Connection conn)
{
if (conn != null)
{
try
{
conn.close();
}
catch (final SQLException e)
{
logger.debug(e.getLocalizedMessage(), e);
}
}
}
public void close(final ResultSet rs, final PreparedStatement pstmt, final Connection conn)
{
close(rs);
close(pstm... | // (see org.postgresql.jdbc.PgDatabaseMetaData.getProcedures)
close(rs);
rs = database.getConnection()
.getMetaData()
.getProcedures(database.getDbName(), null, functionNamePattern);
while (rs.next())
{
final String functionName = rs.getString("PROCEDURE_NAME");
final String schemaName = r... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\impl\SQLHelper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static List<TsKvEntry> fromProto(TransportProtos.TbSubUpdateProto proto) {
List<TsKvEntry> result = new ArrayList<>();
for (var p : proto.getDataList()) {
result.addAll(fromTsValueProtoList(p.getKey(), p.getTsValueList()));
}
return result;
}
static ToCoreNoti... | dataBuilder.addAllTsValue(value);
builder.addData(dataBuilder.build());
});
var result = TransportProtos.LocalSubscriptionServiceMsgProto.newBuilder();
if (timeSeries) {
result.setTsUpdate(builder);
} else {
builder.setScope(scope);
result... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbSubscriptionUtils.java | 2 |
请完成以下Java代码 | public class JCacheCacheMeterBinderProvider implements CacheMeterBinderProvider<JCacheCache> {
private final boolean registerCacheRemovalsAsFunctionCounter;
/**
* Creates a {@code JCacheCacheMeterBinderProvider} that registers cache removals as a
* {@link Gauge}.
*/
public JCacheCacheMeterBinderProvider() {
... | * are registered as a {@link Gauge}. When {@code true}, cache removals are registered
* as a {@link FunctionCounter}.
* @param registerCacheRemovalsAsFunctionCounter whether to register removals as a
* gauge or a function counter
* @since 3.4.12
*/
public JCacheCacheMeterBinderProvider(boolean registerCacheR... | repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\metrics\JCacheCacheMeterBinderProvider.java | 1 |
请完成以下Java代码 | public class C_PaySelection_RevolutPayment_CSVExport extends JavaProcess implements IProcessPrecondition
{
private final IPaySelectionDAO paySelectionDAO = Services.get(IPaySelectionDAO.class);
private static final AdMessageKey REVOLUT_AVAILABLE_ONLY_FOR_CREDIT_TRANSFER_ERROR = AdMessageKey.of("C_PaySelection_Revolu... | protected String doIt()
{
final RevolutExportService revolutExportService = SpringContextHolder.instance.getBean(RevolutExportService.class);
final PaySelectionService paySelectionService = SpringContextHolder.instance.getBean(PaySelectionService.class);
final I_C_PaySelection paySelection = paySelectionDAO.get... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.revolut\src\main\java\de\metas\payment\revolut\process\C_PaySelection_RevolutPayment_CSVExport.java | 1 |
请完成以下Java代码 | public String asString() {
return "spring.rabbit.stream.template.name";
}
}
}
/**
* Default {@link RabbitStreamTemplateObservationConvention} for Rabbit template key values.
*/
public static class DefaultRabbitStreamTemplateObservationConvention
implements RabbitStreamTemplateObservationConvention... | public static final DefaultRabbitStreamTemplateObservationConvention INSTANCE =
new DefaultRabbitStreamTemplateObservationConvention();
@Override
public KeyValues getLowCardinalityKeyValues(RabbitStreamMessageSenderContext context) {
return KeyValues.of(RabbitStreamTemplateObservation.TemplateLowCardinality... | repos\spring-amqp-main\spring-rabbit-stream\src\main\java\org\springframework\rabbit\stream\micrometer\RabbitStreamTemplateObservation.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Character generateCharacterChatModel(@PathVariable String race) {
return characterService.generateCharacterChatModel(race);
}
@GetMapping("/chat-client/{race}")
public Character generateCharacterChatClient(@PathVariable String race) {
return characterService.generateCharacterChatClie... | return characterService.generateMapOfCharactersChatClient(amount);
}
// List of character names
@GetMapping("/chat-model/names/{amount}")
public List<String> generateListOfCharacterNamesChatModel(@PathVariable int amount) {
return characterService.generateListOfCharacterNamesChatModel(amount);... | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springaistructuredoutput\controller\CharacterController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class SysClient implements ISysClient {
private IDeptService deptService;
private IPostService postService;
private IRoleService roleService;
private ITenantService tenantService;
@Override
@GetMapping(API_PREFIX + "/getDept")
public Dept getDept(Long id) {
return deptService.getById(id);
}
@Ove... | @Override
@GetMapping(API_PREFIX + "/getRoleName")
public String getRoleName(Long id) {
return roleService.getById(id).getRoleName();
}
@Override
public List<String> getRoleNames(String roleIds) {
return roleService.getRoleNames(roleIds);
}
@Override
@GetMapping(API_PREFIX + "/getRoleAlias")
public Strin... | repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\feign\SysClient.java | 2 |
请完成以下Java代码 | public class AuthenticatedReactiveAuthorizationManager<T> implements ReactiveAuthorizationManager<T> {
private AuthenticationTrustResolver authTrustResolver = new AuthenticationTrustResolverImpl();
AuthenticatedReactiveAuthorizationManager() {
}
@Override
public Mono<AuthorizationResult> authorize(Mono<Authenti... | * @param authentication to be checked
* @return <code>true</code> if not anonymous, otherwise <code>false</code>.
*/
private boolean isNotAnonymous(Authentication authentication) {
return !this.authTrustResolver.isAnonymous(authentication);
}
/**
* Gets an instance of {@link AuthenticatedReactiveAuthorizati... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\AuthenticatedReactiveAuthorizationManager.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public MongoClient mongoClient() {
return MongoClients.create(mongodbUrl);
}
@Bean
public EmbeddingStore<TextSegment> embeddingStore(MongoClient mongoClient) {
String collectionName = "embeddings";
String indexName = "embedding";
Long maxResultRatio = 10L;
CreateColl... | .build();
}
@Bean
public ContentRetriever contentRetriever(EmbeddingStore<TextSegment> embeddingStore, EmbeddingModel embeddingModel) {
return EmbeddingStoreContentRetriever.builder()
.embeddingStore(embeddingStore)
.embeddingModel(embeddingModel)
.maxResults(10)
... | repos\tutorials-master\libraries-llms-2\src\main\java\com\baeldung\chatbot\mongodb\configuration\ChatBotConfiguration.java | 2 |
请完成以下Java代码 | public Builder attributes(Consumer<Map<String, Object>> attributesConsumer) {
if (this.attributes == null) {
this.attributes = new HashMap<>();
}
attributesConsumer.accept(this.attributes);
return this;
}
/**
* Sets an attribute associated to the context.
* @param name the name of the attribu... | public OAuth2AuthorizationContext build() {
Assert.notNull(this.principal, "principal cannot be null");
OAuth2AuthorizationContext context = new OAuth2AuthorizationContext();
if (this.authorizedClient != null) {
context.clientRegistration = this.authorizedClient.getClientRegistration();
context.authori... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\OAuth2AuthorizationContext.java | 1 |
请完成以下Java代码 | public java.sql.Timestamp getPreparationTime_4 ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_PreparationTime_4);
}
/** Set Bereitstellungszeit Fr.
@param PreparationTime_5
Preparation time for Friday
*/
@Override
public void setPreparationTime_5 (java.sql.Timestamp PreparationTime_5)
{
set_Va... | @Override
public void setPreparationTime_7 (java.sql.Timestamp PreparationTime_7)
{
set_Value (COLUMNNAME_PreparationTime_7, PreparationTime_7);
}
/** Get Bereitstellungszeit So.
@return Preparation time for Sunday
*/
@Override
public java.sql.Timestamp getPreparationTime_7 ()
{
return (java.sql.Times... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_TourVersion.java | 1 |
请完成以下Java代码 | public MessageEventDefinition getMessageEventDefinition() {
return messageEventDefinition;
}
protected ThrowMessage getThrowMessage(DelegateExecution execution) {
return messageExecutionContext.createThrowMessage(execution);
}
protected void dispatchEvent(DelegateExecution execution, T... | .getProcessEngineConfiguration()
.getEventDispatcher()
.dispatchEvent(
ActivitiEventBuilder.createMessageSentEvent(execution, messageName, correlationKey, payload)
);
});
}
public ThrowMessageDelegate getDelegate() ... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\AbstractThrowMessageEventActivityBehavior.java | 1 |
请完成以下Java代码 | private String createMnemonic(String text)
{
m_savedMnemonic = 0;
if (text == null)
return text;
int pos = text.indexOf('&');
if (pos != -1) // We have a nemonic
{
char ch = text.charAt(pos+1);
if (ch != ' ') // &_ - is the & character
{
setDisplayedMnemonic(ch);
setSave... | if (c instanceof JTextComponent)
{
if (m_savedMnemonic > 0)
{
((JTextComponent)c).setFocusAccelerator(m_savedMnemonic);
}
}
} // setLabelFor
/**
* @return Returns the savedMnemonic.
*/
public char getSavedMnemonic ()
{
return m_savedMnemonic;
} // getSavedMnemonic
/**
* @param saved... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CLabel.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws IOException {
//创建一个ServerSocket在端口4700监听客户请求
try (ServerSocket server = new ServerSocket(4700)) {
while (true) {
//使用accept()阻塞等待客户请求,有客户, 请求到来则产生一个Socket对象,并继续执行
Socket socket = server.accept();
... | os.flush();
line = is.readLine();
}
// 关闭连接
socket.close();
} catch (Exception e) {
e.printStackTrace();
}
});
}
} catch... | repos\spring-boot-student-master\spring-boot-student-netty\src\main\java\com\xiaolyuh\bio\SocketServer.java | 1 |
请完成以下Java代码 | public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRole() {
return role;
} | public void setRole(String role) {
this.role = role;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
} | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\models\User.java | 1 |
请完成以下Java代码 | public OffsetTime getOffsetTime() {
return offsetTime;
}
public void setOffsetTime(OffsetTime offsetTime) {
this.offsetTime = offsetTime;
}
public Instant getInstant() {
return instant;
}
public void setInstant(Instant instant) {
this.instant = instant;
}
... | public OffsetDateTime getOffsetDateTime() {
return offsetDateTime;
}
public void setOffsetDateTime(OffsetDateTime offsetDateTime) {
this.offsetDateTime = offsetDateTime;
}
public ZonedDateTime getZonedDateTime() {
return zonedDateTime;
}
public void setZonedDateTime(Zo... | repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\hibernate\pojo\TemporalValues.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PostService implements IPostService {
@Autowired
private PostRepository postRepository;
@Autowired
private IUserService userService;
@Override
public List<Post> getPostsList(int page, int size, String sortDir, String sort) {
PageRequest pageReq
= PageRequest.... | }
@Override
public void updatePost(Post post) {
postRepository.save(post);
}
@Override
public Post createPost(Post post) {
return postRepository.save(post);
}
@Override
public Post getPostById(Long id) {
return postRepository.getReferenceById(id);
}
} | repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\springpagination\service\PostService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ZebraConfigRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final transient IMsgBL msgBL = Services.get(IMsgBL.class);
private static final AdMessageKey MSG_NO_ZEBRA_CONFIG = AdMessageKey.of("WEBUI_NoZebraConfigDefined");
public I_AD_Zebra_Config getById(@NonNull fin... | return defaultZebraConfigId;
}
public ZebraConfigId retrieveZebraConfigId(final BPartnerId partnerId, final ZebraConfigId defaultZebraConfigId)
{
final I_C_BP_PrintFormat printFormat = queryBL
.createQueryBuilder(I_C_BP_PrintFormat.class)
.addEqualsFilter(I_C_BP_PrintFormat.COLUMNNAME_C_BPartner_ID, partn... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\api\ZebraConfigRepository.java | 2 |
请完成以下Spring Boot application配置 | app.datasource.ds1.url=jdbc:mysql://localhost:3306/authorsdb?createDatabaseIfNotExist=true
app.datasource.ds1.username=root
app.datasource.ds1.password=root
app.datasource.ds1.connection-timeout=50000
app.datasource.ds1.idle-timeout=300000
app.datasource.ds1.max-lifetime=900000
app.datasource.ds1.maximum-pool-size=5
ap... | ol-size=6
app.datasource.ds2.minimum-idle=6
app.datasource.ds2.pool-name=PostgreSqlConnectionPool
app.flyway.ds2.location=classpath:db/migration/postgresql
app.flyway.ds2.schema=booksdb
spring.flyway.enabled=false
spring.jpa.show-sql=true
logging.level.com.zaxxer.hikari.HikariConfig=DEBUG
logging.level.com.zaxxer.hi... | repos\Hibernate-SpringBoot-master\HibernateSpringBootFlywayTwoVendors\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public int getPA_GoalParent_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PA_GoalParent_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_PA_Measure getPA_Measure() throws RuntimeException
{
return (I_PA_Measure)MTable.get(getCtx(), I_PA_Measure.Table_Name)
.getPO(getPA_Measur... | {
set_Value (COLUMNNAME_RelativeWeight, RelativeWeight);
}
/** Get Relative Weight.
@return Relative weight of this step (0 = ignored)
*/
public BigDecimal getRelativeWeight ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RelativeWeight);
if (bd == null)
return Env.ZERO;
return bd;
}
/**... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Goal.java | 1 |
请完成以下Java代码 | public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getResourceType() {
return resourceType;
}
... | public String getParentIds() {
return parentIds;
}
public void setParentIds(String parentIds) {
this.parentIds = parentIds;
}
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
... | repos\springboot-demo-master\shiro\src\main\java\com\et\shiro\entity\SysPermission.java | 1 |
请完成以下Java代码 | public class JsonConverters
{
public JsonPagingDescriptor createJsonPagingDescriptor(@NonNull final QueryResultPage<?> page)
{
final JsonPagingDescriptorBuilder jsonPagingDescriptor = JsonPagingDescriptor.builder()
.pageSize(page.getItems().size())
.resultTimestamp(page.getResultTimestamp().toEpochMilli())
... | {
if (jsonExternalId == null)
{
return null;
}
return ExternalId.of(jsonExternalId.getValue());
}
@NonNull
public JsonAttachmentType toJsonAttachmentType(@NonNull final AttachmentEntryType type)
{
switch (type)
{
case Data:
return JsonAttachmentType.Data;
case URL:
return JsonAttachmen... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\utils\JsonConverters.java | 1 |
请完成以下Java代码 | public class CompositeReceiptScheduleListener implements IReceiptScheduleListener
{
private final CopyOnWriteArrayList<IReceiptScheduleListener> listeners = new CopyOnWriteArrayList<IReceiptScheduleListener>();
public void addReceiptScheduleListener(final IReceiptScheduleListener listener)
{
Check.assumeNotNull(l... | listener.onAfterClose(receiptSchedule);
}
}
@Override
public void onBeforeReopen(I_M_ReceiptSchedule receiptSchedule)
{
for (final IReceiptScheduleListener listener : listeners)
{
listener.onBeforeReopen(receiptSchedule);
}
}
@Override
public void onAfterReopen(I_M_ReceiptSchedule receiptSchedule)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\spi\impl\CompositeReceiptScheduleListener.java | 1 |
请完成以下Java代码 | protected Class<?> requiredViewClass() {
return MustacheView.class;
}
/**
* Set the {@link Charset} to use.
* @param charset the charset
* @since 4.1.0
*/
public void setCharset(@Nullable Charset charset) {
this.charset = charset;
}
/**
* Set the name of the charset to use.
* @param charset the c... | setCharset((charset != null) ? Charset.forName(charset) : null);
}
@Override
protected AbstractUrlBasedView buildView(String viewName) throws Exception {
MustacheView view = (MustacheView) super.buildView(viewName);
view.setCompiler(this.compiler);
view.setCharset(this.charset);
return view;
}
@Override
... | repos\spring-boot-main\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\servlet\view\MustacheViewResolver.java | 1 |
请完成以下Java代码 | public String toString() {
return (
"ProcessInstance{" +
"id='" +
id +
'\'' +
", name='" +
name +
'\'' +
", processDefinitionId='" +
processDefinitionId +
'\'' +
", processDefiniti... | ", completedDate=" +
completedDate +
", businessKey='" +
businessKey +
'\'' +
", status=" +
status +
", processDefinitionVersion='" +
processDefinitionVersion +
'\'' +
", processDefinitionName='" +
... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\ProcessInstanceImpl.java | 1 |
请完成以下Java代码 | public void setC_ChargeType_ID (int C_ChargeType_ID)
{
if (C_ChargeType_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_ChargeType_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_ChargeType_ID, Integer.valueOf(C_ChargeType_ID));
}
/** Get Charge Type.
@return Charge Type */
public int getC_ChargeType_ID ()
... | {
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ChargeType.java | 1 |
请完成以下Java代码 | private void appendXForwarded(URI uri) {
// Append the legacy headers if they were already added upstream
String host = headers.getFirst("x-forwarded-host");
if (host == null) {
return;
}
host = host + "," + uri.getHost();
headers.set("x-forwarded-host", host);
String proto = headers.getFirst("x-forwar... | */
private @Nullable Mono<Object> getRequestBody() {
for (String key : bindingContext.getModel().asMap().keySet()) {
if (key.startsWith(BindingResult.MODEL_KEY_PREFIX)) {
BindingResult result = (BindingResult) bindingContext.getModel().asMap().get(key);
Object target = result.getTarget();
if (target !... | repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webflux\src\main\java\org\springframework\cloud\gateway\webflux\ProxyExchange.java | 1 |
请完成以下Java代码 | public void init(FilterConfig filterConfig) {
}
@Override
public void destroy() {
}
public FilterChainProxy getFilterChainProxy() {
return this.filterChainProxy;
}
static class DebugRequestWrapper extends HttpServletRequestWrapper {
private static final Logger logger = new Logger();
DebugRequestWrappe... | if (!sessionExists) {
DebugRequestWrapper.logger.info("New HTTP session created: " + session.getId(), true);
}
return session;
}
@Override
public HttpSession getSession(boolean create) {
if (!create) {
return super.getSession(create);
}
return getSession();
}
}
} | repos\spring-security-main\web\src\main\java\org\springframework\security\web\debug\DebugFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class AsyncContinuationConfiguration implements JobHandlerConfiguration {
protected String atomicOperation;
protected String transitionId;
public String getAtomicOperation() {
return atomicOperation;
}
public void setAtomicOperation(String atomicOperation) {
this.atomicO... | // store id of selected transition in case this is async after.
// id is not serialized with the execution -> we need to remember it as
// job handler configuration.
configuration += "$" + transitionId;
}
return configuration;
}
}
public void onDelete(AsyncContinuationConf... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\AsyncContinuationJobHandler.java | 2 |
请完成以下Java代码 | public void setCdtNoteAmt(ActiveOrHistoricCurrencyAndAmount value) {
this.cdtNoteAmt = value;
}
/**
* Gets the value of the taxAmt property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
*... | public List<DocumentAdjustment1> getAdjstmntAmtAndRsn() {
if (adjstmntAmtAndRsn == null) {
adjstmntAmtAndRsn = new ArrayList<DocumentAdjustment1>();
}
return this.adjstmntAmtAndRsn;
}
/**
* Gets the value of the rmtdAmt property.
*
* @return
* possib... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\RemittanceAmount2.java | 1 |
请完成以下Java代码 | public void execute() throws BuildException {
if (dir==null) {
throw new BuildException("dir attribute is required with the launch task");
}
if (script==null) {
throw new BuildException("script attribute is required with the launch task");
}
String[] cmd = null;
String e... | if (os.indexOf("linux")!=-1 || os.indexOf("mac")!=-1) {
if (exists(base+".sh")) {
return base+".sh";
}
}
throw new BuildException("couldn't find executable for script "+base);
}
public boolean exists(String path) {
File file = new File(path);
return (file.exists());
}
pu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ant\LaunchTask.java | 1 |
请完成以下Java代码 | public colgroup setChar(String character)
{
addAttribute("char",character);
return(this);
}
/**
Sets the charoff="" attribute.
@param char_off When present this attribute specifies the offset
of the first occurrence of the alignment character on each line.
... | return(this);
}
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
*/
public colgroup addElement(String hashcode,String element)
{
addElementToRegistry(hashcode,element);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\colgroup.java | 1 |
请完成以下Java代码 | private boolean isAggregateHU(final HUEditorRow huRow)
{
final I_M_HU hu = huRow.getM_HU();
return handlingUnitsBL.isAggregateHU(hu);
}
private final IAttributeStorage getAttributeStorage(final IHUContext huContext, final I_M_HU hu)
{
final IAttributeStorageFactory attributeStorageFactory = huContext.getHUAt... | }
/**
* @return context document/lines (e.g. the receipt schedules)
*/
private List<TableRecordReference> getContextDocumentLines()
{
if (view == null)
{
return ImmutableList.of();
}
return view.getReferencingDocumentPaths()
.stream()
.map(referencingDocumentPath -> documentCollections.getTa... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUIHUCreationWithSerialNumberService.java | 1 |
请完成以下Java代码 | public void setPersonalDataCategory (final @Nullable java.lang.String PersonalDataCategory)
{
set_Value (COLUMNNAME_PersonalDataCategory, PersonalDataCategory);
}
@Override
public java.lang.String getPersonalDataCategory()
{
return get_ValueAsString(COLUMNNAME_PersonalDataCategory);
}
@Override
public vo... | @Override
public java.lang.String getValueMax()
{
return get_ValueAsString(COLUMNNAME_ValueMax);
}
@Override
public void setValueMin (final @Nullable java.lang.String ValueMin)
{
set_Value (COLUMNNAME_ValueMin, ValueMin);
}
@Override
public java.lang.String getValueMin()
{
return get_ValueAsString(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Column.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
@Override
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public String getUserId() {
... | @Override
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
if (this.userId != null && groupId != null) {
throw new ActivitiException("Cannot assign a groupId to a task assignment that already has a userId");
}
this.groupId =... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricIdentityLinkEntity.java | 1 |
请完成以下Java代码 | public void setProcessInfo(ProcessInfo pi)
{
m_pi = pi;
}
public ProcessInfo getProcessInfo()
{
return m_pi;
}
// End
/**
* Start Batch
* @param process
* @return running thread
*/
public Thread startBatch (final Runnable process)
{
Thread worker = new Thread()
{
@Override
public voi... | }
/**
* @return Returns the manuBar
*/
public JMenuBar getMenu()
{
return menuBar;
}
public void showFormWindow()
{
if (m_panel instanceof FormPanel2)
{
((FormPanel2)m_panel).showFormWindow(m_WindowNo, this);
}
else
{
AEnv.showCenterScreenOrMaximized(this);
}
}
} // FormFrame | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\FormFrame.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<DeadLetterJobEntity> findJobsByExecutionId(String executionId) {
DbSqlSession dbSqlSession = getDbSqlSession();
// If the execution has been inserted in the same command execution as this query, there can't be any in the database
if (isEntityInserted(dbSqlSession, "executio... | @Override
public void updateJobTenantIdForDeployment(String deploymentId, String newTenantId) {
HashMap<String, Object> params = new HashMap<>();
params.put("deploymentId", deploymentId);
params.put("tenantId", newTenantId);
getDbSqlSession().directUpdate("updateDeadLetterJobTenantId... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisDeadLetterJobDataManager.java | 2 |
请完成以下Java代码 | protected Map<String, Object> normalizeProperties() {
Map<String, Object> normalizedProperties = new HashMap<>();
this.properties.forEach(normalizedProperties::put);
return normalizedProperties;
}
protected abstract T doBind();
public T bind() {
validate();
Assert.hasText(this.name, "name may not... | }
T bound = doBind();
if (this.eventFunction != null && this.service.publisher != null) {
ApplicationEvent applicationEvent = this.eventFunction.apply(bound, this.normalizedProperties);
this.service.publisher.publishEvent(applicationEvent);
}
return bound;
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\ConfigurationService.java | 1 |
请完成以下Java代码 | public class ArchiveSetDataHandlerConverter implements Converter<I_AD_Archive, I_AD_Archive>
{
public static final transient ArchiveSetDataHandlerConverter instance = new ArchiveSetDataHandlerConverter();
@Override
public I_AD_Archive convert(final I_AD_Archive tempArchive)
{
checkValid(tempArchive);
// Assum... | InterfaceWrapperHelper.save(tempArchive);
return tempArchive;
}
private void checkValid(final I_AD_Archive tempArchive)
{
final int expectedTableId = MTable.getTable_ID(org.compiere.model.I_AD_Archive.Table_Name);
final int adTableId = tempArchive.getAD_Table_ID();
Check.assume(adTableId == expectedTableId... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\rpl\requesthandler\ArchiveSetDataHandlerConverter.java | 1 |
请完成以下Java代码 | public static final void checkSequences(final Properties ctx)
{
final ITableSequenceChecker tableSequenceChecker = Services.get(ISequenceDAO.class).createTableSequenceChecker(ctx);
tableSequenceChecker.setSequenceRangeCheck(true);
tableSequenceChecker.setFailOnFirstError(false);
tableSequenceChecker.run();
... | /**
* Check/Initialize DocumentNo/Value Sequences for all Clients
*
* @param ctx context
* @param sp server process or null
*/
private static void checkClientSequences(final Properties ctx)
{
final IClientDAO clientDAO = Services.get(IClientDAO.class);
final String trxName = null;
// Sequence for Do... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\SequenceCheck.java | 1 |
请完成以下Java代码 | public int getC_PaySchedule_ID()
{
return get_ValueAsInt(COLUMNNAME_C_PaySchedule_ID);
}
@Override
public void setDiscount (final BigDecimal Discount)
{
set_Value (COLUMNNAME_Discount, Discount);
}
@Override
public BigDecimal getDiscount()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Disc... | /** Saturday = 6 */
public static final String NETDAY_Saturday = "6";
@Override
public void setNetDay (final @Nullable java.lang.String NetDay)
{
set_Value (COLUMNNAME_NetDay, NetDay);
}
@Override
public java.lang.String getNetDay()
{
return get_ValueAsString(COLUMNNAME_NetDay);
}
@Override
public voi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaySchedule.java | 1 |
请完成以下Java代码 | public final void addNotRetryableExceptions(Class<? extends Exception>... exceptionTypes) {
add(false, exceptionTypes);
notRetryable(Arrays.stream(exceptionTypes));
}
/**
* Subclasses can override this to receive notification of configuration of not
* retryable exceptions.
* @param notRetryable the not ret... | * @param exceptionType the exception type.
* @return the classification of the exception if removal was successful;
* null otherwise.
* @since 2.8.4
* @see #addNotRetryableExceptions(Class...)
* @see #setClassifications(Map, boolean)
*/
@Nullable
public Boolean removeClassification(Class<? extends Excepti... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\ExceptionClassifier.java | 1 |
请完成以下Java代码 | public String toString()
{
return "MProductPricing ["
+ pricingCtx
+ ", " + result
+ "]";
}
public void setConvertPriceToContextUOM(boolean convertPriceToContextUOM)
{
pricingCtx.setConvertPriceToContextUOM(convertPriceToContextUOM);
}
public void setReferencedObject(Object referencedObject)
{
... | {
return TaxCategoryId.toRepoId(result.getTaxCategoryId());
}
public boolean isManualPrice()
{
return pricingCtx.getManualPriceEnabled().isTrue();
}
public void setManualPrice(boolean manualPrice)
{
pricingCtx.setManualPriceEnabled(manualPrice);
}
public void throwProductNotOnPriceListException()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MProductPricing.java | 1 |
请完成以下Java代码 | public void clearTransactions()
{
if (trxAttributesCollector != null)
{
trxAttributesCollector.clearTransactions();
}
}
@Override
public void transferAttributes(@NonNull final IHUAttributeTransferRequest request)
{
logger.trace("Transfering attributes for {}", request);
final IAttributeSet attribute... | return AllocationUtils.nullResult();
}
return AllocationUtils.createQtyAllocationResult(
BigDecimal.ZERO, // qtyToAllocate
BigDecimal.ZERO, // qtyAllocated
Collections.emptyList(), // trxs
attributeTrxs // attribute transactions
);
}
@Override
public IAllocationResult createAndProcessAllocati... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUTransactionAttributeBuilder.java | 1 |
请完成以下Java代码 | protected CostDetailCreateResult createCostForMatchInvoice_MaterialCosts(final CostDetailCreateRequest request)
{
final CurrentCost currentCosts = utils.getCurrentCost(request);
final CostDetailPreviousAmounts previousCosts = CostDetailPreviousAmounts.of(currentCosts);
final CostDetailCreateResult result = ut... | final Quantity qty = utils.convertToUOM(request.getQty(), price.getUomId(), request.getProductId());
final CostAmount amt = price.multiply(qty).roundToPrecisionIfNeeded(currentCosts.getPrecision());
final CostDetailCreateRequest requestEffective = request.withAmount(amt);
result = utils.createCostDetailRecord... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\methods\AverageInvoiceCostingMethodHandler.java | 1 |
请完成以下Java代码 | protected void complete(Object value, PlanItemInstanceEntity planItemInstanceEntity) {
if (resultVariable != null) {
if (storeResultVariableAsTransient) {
planItemInstanceEntity.setTransientVariable(resultVariable, value);
} else {
planItemInstanceEntity.s... | public FutureExpressionCompleteAction(PlanItemInstanceEntity planItemInstanceEntity) {
this.planItemInstanceEntity = planItemInstanceEntity;
}
@Override
public void accept(Object value, Throwable throwable) {
if (throwable == null) {
complete(value, planI... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\PlanItemExpressionActivityBehavior.java | 1 |
请完成以下Java代码 | public void setM_Warehouse_ID (final int M_Warehouse_ID)
{
if (M_Warehouse_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, M_Warehouse_ID);
}
@Override
public int getM_Warehouse_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID);
}... | @Override
public void setTotal_Qty_Six_Weeks_Ago (final @Nullable BigDecimal Total_Qty_Six_Weeks_Ago)
{
set_ValueNoCheck (COLUMNNAME_Total_Qty_Six_Weeks_Ago, Total_Qty_Six_Weeks_Ago);
}
@Override
public BigDecimal getTotal_Qty_Six_Weeks_Ago()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Total_Qt... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\replenishment\X_M_Material_Needs_Planner_V.java | 1 |
请完成以下Java代码 | public class AccountData {
private String accountNo;
private String accountStatus;
private Long balance;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createDate;
public String getAccountNo() {
return accountNo;
}
... | }
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
... | repos\spring-boot-leaning-master\2.x_data\2-4 MongoDB 支持动态 SQL、分页方案\spring-boot-mongodb-page\src\main\java\com\neo\result\AccountData.java | 1 |
请完成以下Java代码 | public void setAsynchronousLeaveNotExclusive(boolean asynchronousLeaveNotExclusive) {
this.asynchronousLeaveNotExclusive = asynchronousLeaveNotExclusive;
}
public Object getBehavior() {
return behavior;
}
public void setBehavior(Object behavior) {
this.behavior = behavior;
}
publi... | public void setValues(FlowNode otherNode) {
super.setValues(otherNode);
setAsynchronous(otherNode.isAsynchronous());
setNotExclusive(otherNode.isNotExclusive());
setAsynchronousLeave(otherNode.isAsynchronousLeave());
setAsynchronousLeaveNotExclusive(otherNode.isAsynchronousLeaveN... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\FlowNode.java | 1 |
请完成以下Java代码 | private void addCommonFormatters(CommonFormatters<LogEvent> commonFormatters) {
commonFormatters.add(CommonStructuredLogFormat.ELASTIC_COMMON_SCHEMA, this::createEcsFormatter);
commonFormatters.add(CommonStructuredLogFormat.GRAYLOG_EXTENDED_LOG_FORMAT, this::createGraylogFormatter);
commonFormatters.add(Common... | Assert.state(contextPairs != null, "'contextPairs' must not be null");
return new GraylogExtendedLogFormatStructuredLogFormatter(environment, stackTracePrinter, contextPairs,
jsonMembersCustomizer);
}
private LogstashStructuredLogFormatter createLogstashFormatter(Instantiator<?> instantiator) {
StackTra... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\log4j2\StructuredLogLayout.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Account findByName(String accountName) {
Assert.hasLength(accountName);
return repository.findByName(accountName);
}
/**
* {@inheritDoc}
*/
@Override
public Account create(User user) {
Account existing = repository.findByName(user.getUsername());
Assert.isNull(existing, "account already exists:... | /**
* {@inheritDoc}
*/
@Override
public void saveChanges(String name, Account update) {
Account account = repository.findByName(name);
Assert.notNull(account, "can't find account with name " + name);
account.setIncomes(update.getIncomes());
account.setExpenses(update.getExpenses());
account.setSaving(... | repos\piggymetrics-master\account-service\src\main\java\com\piggymetrics\account\service\AccountServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class SessionServiceImpl implements SessionService {
@Autowired
private SessionDAO sessionDAO;
@Override
public List<UserOnline> list() {
List<UserOnline> list = new ArrayList<>();
Collection<Session> sessions = sessionDAO.getActiveSessions();
for (Session session : sessions) {
UserOnline userOnli... | Long timeout = session.getTimeout();
if (timeout == 0l) {
userOnline.setStatus("离线");
} else {
userOnline.setStatus("在线");
}
userOnline.setTimeout(timeout);
list.add(userOnline);
}
return list;
}
@Override
public boolean forceLogout(String sessionId) {
Session session = sessionDAO.readS... | repos\SpringAll-master\17.Spring-Boot-Shiro-Session\src\main\java\com\springboot\service\impl\SessionServiceImpl.java | 2 |
请完成以下Java代码 | public synchronized void stop() {
if (started) {
started = false;
if (cleanerTask != null) {
cleanerTask.cancel(false);
cleanerTask = null;
}
}
}
/**
* Destroy "cleanup" scheduler.
*/
@Override
public synchron... | if (dereg != null)
expirationListener.registrationExpired(dereg.getRegistration(), dereg.getObservations());
}
}
}
} catch (Exception e) {
log.warn("Unexpected Exception while registration cleaning", ... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\store\TbLwM2mRedisRegistrationStore.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO (Properties ctx)
{
org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
return poi;
}
/** Set Users Group.
@param AD_UserGroup_ID Users Group */
@Override
public void setAD_UserGroup_ID (int AD_UserGr... | public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Beschreibung.
@return Beschreibung */
@Override
public java.lang.String getDescription ()
{
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserGroup.java | 1 |
请完成以下Java代码 | public class ExecutionTreeStringBuilder {
protected ExecutionEntity executionEntity;
public ExecutionTreeStringBuilder(ExecutionEntity executionEntity) {
this.executionEntity = executionEntity;
}
/* See http://stackoverflow.com/questions/4965335/how-to-print-binary-tree-diagram */
@Overri... | return strb.toString();
}
protected void internalToString(ExecutionEntity execution, StringBuilder strb, String prefix, boolean isTail) {
strb
.append(prefix)
.append(isTail ? "└── " : "├── ")
.append(execution.getId())
.append(" : ")
.append(... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\util\ExecutionTreeStringBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.sysFormFileService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "表单评论文件-通过id查询")
@... | }
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, respons... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysFormFileController.java | 2 |
请完成以下Java代码 | default LogAccessor logger() {
return new LogAccessor(LogFactory.getLog(getClass()));
}
/**
* Handle the exception for a batch listener. The complete {@link ConsumerRecords}
* from the poll is supplied. Return the members of the batch that should be re-sent to
* the listener. The returned records MUST be in ... | /**
* Set to false to prevent the container from committing the offset of a recovered
* record (when the error handler does not itself throw an exception).
* @param ack false to not commit.
*/
default void setAckAfterHandle(boolean ack) {
throw new UnsupportedOperationException("This error handler does not s... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\CommonErrorHandler.java | 1 |
请完成以下Java代码 | public Mono<Authentication> getAuthentication(Map<String, Object> payload) {
String authorizationValue = getAuthorizationValue(payload);
if (authorizationValue == null) {
return Mono.empty();
}
if (!StringUtils.startsWithIgnoreCase(authorizationValue, "bearer")) {
BearerTokenError error = BearerTokenErro... | return Mono.just(new BearerTokenAuthenticationToken(token));
}
private @Nullable String getAuthorizationValue(Map<String, Object> payload) {
String value = (String) payload.get(this.authorizationKey);
if (value != null) {
return value;
}
for (String key : payload.keySet()) {
if (key.equalsIgnoreCase(th... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\server\support\BearerTokenAuthenticationExtractor.java | 1 |
请完成以下Java代码 | public InvoiceId retrievePredecessorSalesContractInvoiceId(final InvoiceId invoiceId)
{
final I_C_Invoice invoice = invoiceDAO.getByIdInTrx(invoiceId);
final Optional<InvoiceId> predecessorInvoice = queryBL.createQueryBuilder(I_C_Invoice.class)
.addEqualsFilter(I_C_Invoice.COLUMNNAME_C_BPartner_ID, invoice.ge... | final List<I_C_InvoiceLine> invoiceLines = invoiceDAO.retrieveLines(invoice);
final List<I_C_Invoice_Candidate> allInvoiceCands = new ArrayList<>();
for (final I_C_InvoiceLine invoiceLine : invoiceLines)
{
final List<I_C_Invoice_Candidate> cands = invoiceCandDAO.retrieveIcForIl(invoiceLine);
allInvoiceCan... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\invoice\ContractInvoiceService.java | 1 |
请完成以下Java代码 | public boolean isInternal() {
return false;
}
@Override
public void onRetransmission() {
}
@Override
public void onResponse(Response response) {
}
@Override
public void onAcknowledgement() {
onAcknowledge.accept(msgId);
}
@Override
public void onReje... | public void onSent(boolean retransmission) {
}
@Override
public void onSendError(Throwable error) {
}
@Override
public void onResponseHandlingError(Throwable cause) {
}
@Override
public void onContextEstablished(EndpointContext endpointContext) {
}
@Override
publi... | repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\TbCoapMessageObserver.java | 1 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Default.
@param IsDefault
Default value
*/
public void setIsDefault (boolean ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CashBook.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class RemoteDevToolsAutoConfiguration {
private static final Log logger = LogFactory.getLog(RemoteDevToolsAutoConfiguration.class);
private final DevToolsProperties properties;
RemoteDevToolsAutoConfiguration(DevToolsProperties properties) {
this.properties = properties;
}
@Bean
@ConditionalOnM... | * Configuration for remote update and restarts.
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnBooleanProperty(name = "spring.devtools.remote.restart.enabled", matchIfMissing = true)
static class RemoteRestartConfiguration {
@Bean
@ConditionalOnMissingBean
SourceDirectoryUrlFilter remoteRestartSo... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\autoconfigure\RemoteDevToolsAutoConfiguration.java | 2 |
请完成以下Java代码 | public String suffix() {
return this.suffix;
}
public long delay() {
return this.delayMs;
}
/**
* Return the number of partitions the
* retry topics should be created with.
* @return the number of partitions.
* @since 2.7.13
*/
public int numPartitions() {
return this.numPartitions;
... | @Override
public String toString() {
return "Properties{" +
"delayMs=" + this.delayMs +
", suffix='" + this.suffix + '\'' +
", type=" + this.type +
", maxAttempts=" + this.maxAttempts +
", numPartitions=" + this.numPartitions +
", dltStrategy=" + this.dltStrategy +
", kafkaOperat... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DestinationTopic.java | 1 |
请完成以下Java代码 | public void registerProducer(final IDocOutboundProducer producer)
{
outboundProducersLock.lock();
try
{
registerProducer0(producer);
}
finally
{
outboundProducersLock.unlock();
}
}
private void registerProducer0(@NonNull final IDocOutboundProducer producer)
{
final AdTableId tableId = produce... | {
// no producer was not registered for given config, nothing to unregister
return;
}
producer.destroy(this);
outboundProducers.remove(tableId);
}
private List<IDocOutboundProducer> getProducersList()
{
return new ArrayList<>(outboundProducers.values());
}
@Override
public void createDocOutbound(... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\api\impl\DocOutboundProducerService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<OAuth2ClientInfo> findTenantOAuth2ClientInfosByIds(
@Parameter(description = "A list of oauth2 ids, separated by comma ','", array = @ArraySchema(schema = @Schema(type = "string")), required = true)
@RequestParam("clientIds") UUID[] clientIds) throws ThingsboardException {
Li... | @DeleteMapping(value = "/oauth2/client/{id}")
public void deleteOauth2Client(@PathVariable UUID id) throws Exception {
OAuth2ClientId oAuth2ClientId = new OAuth2ClientId(id);
OAuth2Client oAuth2Client = checkOauth2ClientId(oAuth2ClientId, Operation.DELETE);
tbOauth2ClientService.delete(oAuth... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\OAuth2Controller.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class RetrieveContactRequest
{
public enum ContactType
{
BILL_TO_DEFAULT, SHIP_TO_DEFAULT, SALES_DEFAULT, SUBJECT_MATTER
}
public enum IfNotFound
{
RETURN_DEFAULT_CONTACT, RETURN_NULL
}
@NonNull
BPartnerId bpartnerId;
@Nullable
ContactType contactType;
/**
* If specified, then contac... | int getFreightCostIdByBPartnerId(BPartnerId bpartnerId);
ShipmentAllocationBestBeforePolicy getBestBeforePolicy(BPartnerId bpartnerId);
Optional<PaymentTermId> getPaymentTermIdForBPartner(BPartnerId bpartnerId, SOTrx soTrx);
boolean isSalesRep(BPartnerId bpartnerId);
void validateSalesRep(@NonNull BPartnerId bP... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\IBPartnerBL.java | 2 |
请完成以下Java代码 | private boolean isModal()
{
if (_modal != null)
{
return _modal;
}
//
// Checks if we shall display the info window as modal.
// We shall make the info window modal if the given windowNo is for a regular window, because else we would have a leak in managed windows (so this window will not be closed on ... | if (infoWindow != null)
{
final String tableName = Services.get(IADInfoWindowBL.class).getTableName(infoWindow);
setTableName(tableName);
}
return this;
}
private I_AD_InfoWindow getInfoWindow()
{
if (_infoWindowDef != null)
{
return _infoWindowDef;
}
final String tableName = getTableName()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\InfoBuilder.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setContent (final @Nullable java.lang.String Content)
{
set_ValueNoCheck (COLUMNNAME_Content, Content);
}
@Override
public java.lang.String getContent()
{
... | @Override
public java.lang.String getHost()
{
return get_ValueAsString(COLUMNNAME_Host);
}
@Override
public void setRabbitMQ_Message_Audit_ID (final int RabbitMQ_Message_Audit_ID)
{
if (RabbitMQ_Message_Audit_ID < 1)
set_ValueNoCheck (COLUMNNAME_RabbitMQ_Message_Audit_ID, null);
else
set_ValueNoCh... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_RabbitMQ_Message_Audit.java | 1 |
请完成以下Java代码 | public Baeldung getWebsite() {
return website;
}
}
public static class Baeldung {
private List<BaeldungArticle> articleList;
public void setArticleList(List<BaeldungArticle> articleList) {
this.articleList = articleList;
}
public List<BaeldungAr... | this.title = title;
}
public String getTitle() {
return this.title;
}
public void setContent(String content) {
this.content = content;
}
public String getContent() {
return this.content;
}
}
} | repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\sax\SaxParserMain.java | 1 |
请完成以下Java代码 | private OrderLineKey createOrderKeyForOrderLineRecord(@NonNull final I_C_OrderLine orderLineRecord)
{
final ProductDescriptor productDescriptor = productDescriptorFactory.createProductDescriptor(orderLineRecord, AttributesKey.ALL);
final BPartnerId bpartnerId = BPartnerId.ofRepoId(orderLineRecord.getC_BPartner_ID... | return new OrderLineKey(
resultGroup.getProductId().getRepoId(),
resultGroup.getStorageAttributesKey(),
resultGroup.getBpartner());
}
private OrderLineKey(
final int productId,
@NonNull final AttributesKey attributesKey,
@NonNull final BPartnerClassifier bpartner)
{
this.productId =... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\interceptor\OrderAvailableToPromiseTool.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class DeliveryOrderKey
{
@NonNull ShipperId shipperId;
@NonNull ShipperTransportationId shipperTransportationId;
int fromOrgId;
int deliverToBPartnerId;
int deliverToBPartnerLocationId;
@NonNull LocalDate pickupDate;
@NonNull LocalTime timeFrom;
@NonNull LocalTime timeTo;
@Nullable CarrierProductId c... | this.shipperId = shipperId;
this.shipperTransportationId = shipperTransportationId;
this.fromOrgId = fromOrgId;
this.deliverToBPartnerId = deliverToBPartnerId;
this.deliverToBPartnerLocationId = deliverToBPartnerLocationId;
this.pickupDate = pickupDate;
this.timeFrom = timeFrom;
this.timeTo = timeT... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.spi\src\main\java\de\metas\shipper\gateway\spi\DraftDeliveryOrderCreator.java | 2 |
请完成以下Java代码 | public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Character getGender() {
return gender;
} | public void setGender(Character gender) {
this.gender = gender;
}
public Date getBirthDate() {
return birthDate;
}
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
public Float getPercentage() {
return percentage;
}
public void ... | repos\tutorials-master\spring-web-modules\spring-thymeleaf\src\main\java\com\baeldung\thymeleaf\model\Student.java | 1 |
请完成以下Java代码 | public PInstanceId getOnlyAD_PInstance_ID()
{
return onlyAD_PInstance_ID;
}
@Override
public void setOnlyAD_PInstance_ID(final PInstanceId onlyAD_PInstance_ID)
{
this.onlyAD_PInstance_ID = onlyAD_PInstance_ID;
}
@Override
public int getAD_Client_ID()
{
return AD_Client_ID;
}
@Override
public void s... | }
@Override
public void setFilter(ISqlQueryFilter filter)
{
this.filter = filter;
}
@Override
public ISqlQueryFilter getModelFilter()
{
return modelFilter;
}
@Override
public void setModelFilter(ISqlQueryFilter modelFilter)
{
this.modelFilter = modelFilter;
}
@Override
public Access getRequired... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\impl\PrintingQueueQuery.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void publishProductDeletedEvent(final ProductId productId)
{
final PZN pzn = getPZNByProductId(productId);
final MSV3StockAvailability item = MSV3StockAvailability.builder()
.pzn(pzn.getValueAsLong())
.delete(true)
.build();
final MSV3StockAvailabilityUpdatedEvent event = MSV3StockAvailabilit... | .pzn(pzn)
.bpartnerId(bpartnerId.getRepoId())
.delete(true)
.build())
.collect(ImmutableList.toImmutableList());
if (eventItems.isEmpty())
{
return;
}
msv3ServerPeerService.publishProductExcludes(MSV3ProductExcludesUpdateEvent.builder()
.items(eventItems)
.build());
}
privat... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java\de\metas\vertical\pharma\msv3\server\peer\metasfresh\services\MSV3StockAvailabilityService.java | 2 |
请完成以下Java代码 | public int deleteById(Integer id) {
return template.update("DELETE FROM users WHERE id = ?", id);
}
public UserDO selectById(Integer id) {
return template.queryForObject("SELECT id, username, password, create_time FROM users WHERE id = ?",
new BeanPropertyRowMapper<>(UserDO.clas... | public List<UserDO> selectByIds(List<Integer> ids) {
// 创建 NamedParameterJdbcTemplate 对象
NamedParameterJdbcTemplate namedParameterJdbcTemplate = new NamedParameterJdbcTemplate(template);
// 拼接参数
Map<String, Object> params = new HashMap<>();
params.put("ids", ids);
// 执行查询... | repos\SpringBoot-Labs-master\lab-14-spring-jdbc-template\lab-14-jdbctemplate\src\main\java\cn\iocoder\springboot\lab14\jdbctemplate\dao\UserDao.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public org.compiere.model.I_AD_Role getAD_Role()
{
return get_ValueAsPO(COLUMNNAME_AD_Role_ID, org.compiere.model.I_AD_Role.class);
}
@Override
public void setAD_Role(org.compie... | {
return get_ValueAsInt(COLUMNNAME_AD_User_ID);
}
@Override
public void setAD_User_Login_ID (int AD_User_Login_ID)
{
if (AD_User_Login_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_User_Login_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_Login_ID, Integer.valueOf(AD_User_Login_ID));
}
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_User_Login.java | 1 |
请完成以下Java代码 | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Internal.
@param IsInternal
Internal Organization
*/
public void setIsInternal (boolean IsInternal)
{
set_Value (COLUMNNAME_IsInternal, Boolean.valueOf(IsInternal));
}
/** Get Internal.
@return Internal... | 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 to.
@param ValidTo
Valid to including this date (last day)
*/
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Seller.java | 1 |
请完成以下Java代码 | public void setCompanyName(final String companyName)
{
this.companyName = companyName;
this.companyNameSet = true;
}
public void setVendor(final Boolean vendor)
{
this.vendor = vendor;
this.vendorSet = true;
}
public void setCustomer(final Boolean customer)
{
this.customer = customer;
this.customer... | {
this.url3 = url3;
this.url3Set = true;
}
public void setGroup(final String group)
{
this.group = group;
this.groupSet = true;
}
public void setGlobalId(final String globalId)
{
this.globalId = globalId;
this.globalIdset = true;
}
public void setSyncAdvise(final SyncAdvise syncAdvise)
{
this.... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v1\request\JsonRequestBPartner.java | 1 |
请完成以下Java代码 | public void setLogLevel(String levelName)
{
LogManager.setLevel(levelName);
}
@ManagedOperation
public String getLogLevel()
{
final Level level = LogManager.getLevel();
return level == null ? null : level.toString();
}
@ManagedOperation
public void runFinalization()
{ | System.runFinalization();
}
@ManagedOperation
public void resetLocalCache()
{
CacheMgt.get().reset();
}
@ManagedOperation
public void rotateMigrationScriptFile()
{
MigrationScriptFileLoggerHolder.closeMigrationScriptFiles();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\jmx\Metasfresh.java | 1 |
请完成以下Java代码 | public static boolean validateStringFilenameUsingIO(String filename) throws IOException {
File file = new File(filename);
boolean created = false;
try {
created = file.createNewFile();
return created;
} finally {
if (created) {
file.del... | }
public static boolean validateStringFilenameUsingRegex(String filename) {
if (filename == null) {
return false;
}
return filename.matches(REGEX_PATTERN);
}
private static Character[] getInvalidCharsByOS() {
String os = System.getProperty("os.name").toLowerCase... | repos\tutorials-master\core-java-modules\core-java-string-operations-3\src\main\java\com\baeldung\stringfilenamevalidaiton\StringFilenameValidationUtils.java | 1 |
请完成以下Java代码 | public ConditionExpression getCondition() {
return conditionChild.getChild(this);
}
public void setCondition(ConditionExpression condition) {
conditionChild.setChild(this, condition);
}
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.... | .build();
contextRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_CONTEXT_REF)
.idAttributeReference(CaseFileItem.class)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
conditionChild = sequenceBuilder.element(ConditionExpression.class)
.build();
... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ManualActivationRuleImpl.java | 1 |
请完成以下Java代码 | public static CostCollectorType ofCode(@NonNull final String code)
{
final CostCollectorType type = typesByCode.get(code);
if (type == null)
{
throw new AdempiereException("No " + CostCollectorType.class + " found for code: " + code);
}
return type;
}
private static final ImmutableMap<String, CostColle... | public boolean isCoOrByProductReceipt()
{
return this == MixVariance;
}
public boolean isUsageVariance()
{
return this == UsageVariance;
}
public boolean isMaterialUsageVariance(@Nullable final PPOrderBOMLineId orderBOMLineId)
{
return this == UsageVariance && orderBOMLineId != null;
}
public boolean ... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\CostCollectorType.java | 1 |
请完成以下Java代码 | public void execute(DelegateExecution execution) {
ExecutionEntity executionEntity = (ExecutionEntity) execution;
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration();
FlowableEventDispatcher eventDispatcher = processEngineConfiguration.... | if (result) {
processEngineConfiguration.getActivityInstanceEntityManager().recordActivityStart(executionEntity);
FlowableEventDispatcher eventDispatcher = processEngineConfiguration.getEventDispatcher();
if (eventDispatcher != null && eventDispatcher.isEnabled()) {
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\BoundaryConditionalEventActivityBehavior.java | 1 |
请完成以下Java代码 | public class HibernateOneIsOwningSide {
private static final Logger LOGGER = LoggerFactory.getLogger(HibernateOneIsOwningSide.class);
public static void main(String[] args) {
CartOIO cart = new CartOIO();
CartOIO cart2 = new CartOIO();
ItemOIO item1 = new ItemOIO(cart);
ItemO... | // Commit transaction
tx.commit();
session = sessionFactory.getCurrentSession();
tx = session.beginTransaction();
item1 = session.get(ItemOIO.class, 1L);
item2 = session.get(ItemOIO.class, 2L);
tx.commit();
LOGGER.info("item1 ID={}, F... | repos\tutorials-master\persistence-modules\hibernate-annotations\src\main\java\com\baeldung\hibernate\oneToMany\main\HibernateOneIsOwningSide.java | 1 |
请完成以下Java代码 | public class AnnotationGlobalClientInterceptorConfigurer implements GlobalClientInterceptorConfigurer {
private final ApplicationContext applicationContext;
/**
* Creates a new AnnotationGlobalClientInterceptorConfigurer.
*
* @param applicationContext The application context to fetch the {@link... | */
protected Map<String, ClientInterceptor> getClientInterceptorBeans() {
return transformValues(this.applicationContext.getBeansWithAnnotation(GrpcGlobalClientInterceptor.class),
ClientInterceptor.class::cast);
}
@Override
public void configureClientInterceptors(final List<Clie... | repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\interceptor\AnnotationGlobalClientInterceptorConfigurer.java | 1 |
请完成以下Java代码 | public CasePageTask getCasePageTask() {
return casePageTask;
}
public void setCasePageTask(CasePageTask casePageTask) {
this.casePageTask = casePageTask;
}
public PlanItemInstanceEntity getPlanItemInstanceEntity() {
return planItemInstanceEntity;
}
public void setPlanI... | return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public List<String> getCandidateUsers() {
return candidateUsers;
}
public void setCandidateUsers(List<String> candidateUsers) {
this.candidateUsers = candidateUsers;
}
public List<Strin... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\interceptor\CreateCasePageTaskBeforeContext.java | 1 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.omitNullValues()
.add("type", layoutType)
.add("columnCount", columnCount)
.add("internalName", internalName)
.add("elements", elementLines.isEmpty() ? null : elementLines)
.toString();
}
public boolean hasElementLines()
... | public Builder setInternalName(final String internalName)
{
this.internalName = internalName;
return this;
}
public Builder setLayoutType(final LayoutType layoutType)
{
this.layoutType = layoutType;
return this;
}
public Builder setLayoutType(final String layoutTypeStr)
{
layoutType = Lay... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutElementGroupDescriptor.java | 1 |
请完成以下Spring Boot application配置 | app.datasource.url=jdbc:mysql://localhost:3306/numberdb?createDatabaseIfNotExist=true&useSSL=false
app.datasource.username=root
app.datasource.password=root
app.datasource.initialization-mode=always
app.datasource.platform=mysql
app.datasource.partition-count=3
app.datasource.max-connections-per-partition=5
app.dataso... | =true
# more settings can be added as app.datasource.*
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.open-in-view=false
spring.jpa.hibernate.ddl-auto=none | repos\Hibernate-SpringBoot-master\HibernateSpringBootDataSourceBuilderBoneCPKickoff\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public class PaySchedule
{
@NonNull PayScheduleId id;
@NonNull Percent percentage;
@NonNull Percent discount;
@Nullable DayOfWeek netDay;
int netDays;
int graceDays;
int discountDays;
public Money calculateDueAmt(@NonNull final Money grandTotal, @NonNull final CurrencyPrecision precision)
{
return grandTot... | public LocalDate calculateDueDate(@NonNull final LocalDate dateInvoiced)
{
return dateInvoiced.plusDays(netDays);
}
public Money calculateDiscountAmt(@NonNull final Money dueAmt, @NonNull final CurrencyPrecision precision)
{
return dueAmt.multiply(percentage, precision);
}
public LocalDate calculateDiscount... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\paymentterm\PaySchedule.java | 2 |
请完成以下Java代码 | public SignalEventListenerInstanceQuery asc() {
innerQuery.asc();
return this;
}
@Override
public SignalEventListenerInstanceQuery desc() {
innerQuery.desc();
return this;
}
@Override
public SignalEventListenerInstanceQuery orderBy(QueryProperty property) {
... | }
@Override
public SignalEventListenerInstance singleResult() {
PlanItemInstance instance = innerQuery.singleResult();
return SignalEventListenerInstanceImpl.fromPlanItemInstance(instance);
}
@Override
public List<SignalEventListenerInstance> list() {
return convertPlanItem... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\SignalEventListenerInstanceQueryImpl.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.