instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
@Override
public java.lang.String getDescription()
{
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
@Override
public void setHelp (java.lang.String Help)
{
set_Value (COLUMNNAM... | @Override
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
@Override
public void setUIStyle (java.lang.String UIStyle)
{
set_Value (COLUMNNAME_UIStyle, UIStyle);
}
@Override
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UI_Section.java | 1 |
请完成以下Java代码 | public int getM_DeliveryDay_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_DeliveryDay_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Product_ID, org.compiere.model... | {
set_Value (COLUMNNAME_QtyToDeliver, QtyToDeliver);
}
/** Get Ausliefermenge.
@return Ausliefermenge */
@Override
public java.math.BigDecimal getQtyToDeliver ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyToDeliver);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Daten... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_DeliveryDay_Alloc.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ExprotController {
@GetMapping("/excel")
public void exportExcel(HttpServletResponse response) {
List<Person> list = new ArrayList<>();
list.add(new Person(1L, "姓名1", 28, "地址1"));
list.add(new Person(2L, "姓名2", 29, "地址2"));
String[] headers = new String[]{"ID", "名... | List<List<Object>> dataList = list.stream().map(person -> {
List<Object> data = new ArrayList<>();
data.add(person.getId());
data.add(person.getName());
data.add(person.getAge());
data.add(person.getAddress());
return data;
}).collect(Colle... | repos\spring-boot-student-master\spring-boot-student-export\src\main\java\com\xiaolyuh\ExprotController.java | 2 |
请完成以下Java代码 | public TypeSpec getStudentClass() {
return TypeSpec
.classBuilder("Student")
.addSuperinterface(ClassName.get(PERSON_PACKAGE_NAME, "Person"))
.addModifiers(Modifier.PUBLIC)
.addField(FieldSpec
.builder(String.class, "name")
.addModifiers(Modifier.P... | .addAnnotation(Override.class)
.addParameter(String.class, "a")
.addParameter(String.class, "b")
.returns(int.class)
.addStatement("return a.length() - b.length()")
.build())
.build();
}
public void generateGenderEnum() throws IOException {
... | repos\tutorials-master\libraries-2\src\main\java\com\baeldung\javapoet\PersonGenerator.java | 1 |
请完成以下Java代码 | public ResponseEntity<JsonResponseBPRelationComposite> retrieveBPartner(
@ApiParam(required = true, value = ORG_CODE_PARAMETER_DOC)
@PathVariable("orgCode") //
@Nullable final String orgCode, // may be null if called from other metasfresh-code
@ApiParam(required = true, value = BPARTNER_IDENTIFIER_DOC) ... | @PutMapping(value = "{bpartnerIdentifier}", consumes = "application/json")
public ResponseEntity<String> createOrUpdateBPartnerRelation(
@ApiParam(required = true, value = BPARTNER_IDENTIFIER_DOC) //
@PathVariable("bpartnerIdentifier") //
@NonNull final String bpartnerIdentifierStr,
@RequestBody @NonNull ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\bpartner\relation\BpartnerRelationRestController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Customer extends BaseModel {
public Customer(String name, Address address) {
super();
this.name = name;
this.address = address;
}
private String name;
@OneToOne(cascade = CascadeType.ALL)
Address address;
public String getName() {
return name;
... | public void setName(String name) {
this.name = name;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
@Override
public String toString() {
return "Customer [id=" + id + ", name=" + name + ... | repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\ebean\model\Customer.java | 2 |
请完成以下Java代码 | public int getM_InOutLine_ID()
{
return get_ValueAsInt(COLUMNNAME_M_InOutLine_ID);
}
@Override
public void setQtyDeliveredInUOM (final @Nullable BigDecimal QtyDeliveredInUOM)
{
set_Value (COLUMNNAME_QtyDeliveredInUOM, QtyDeliveredInUOM);
}
@Override
public BigDecimal getQtyDeliveredInUOM()
{
final Bi... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyEntered);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyInvoicedInUOM (final @Nullable BigDecimal QtyInvoicedInUOM)
{
set_Value (COLUMNNAME_QtyInvoicedInUOM, QtyInvoicedInUOM);
}
@Override
public BigDecimal getQtyInvoic... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_CallOrderDetail.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws IOException, InterruptedException, KeeperException {
ZooKeeper zk = new ZooKeeper(address, session_timeout, new Watcher() {
// 事件通知
@Override
public void process(WatchedEvent event) {
// 事件状态
Event.... | });
cout.await();
//创建节点
String path="/test";
String create = zk.create(path, "fzp".getBytes(),
ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
System.out.println("-------创建节点: " + create);
System.out.println(new String(zk.getData(path,true,stat)));
... | repos\SpringBootLearning-master\version2.x\springboot-zk-demo\src\main\java\io\github\forezp\springbootzkdemo\ZkTest.java | 1 |
请完成以下Java代码 | public class DefaultBatchToRecordAdapter<K, V> implements BatchToRecordAdapter<K, V> {
private static final LogAccessor LOGGER = new LogAccessor(DefaultBatchToRecordAdapter.class);
private final ConsumerRecordRecoverer recoverer;
/**
* Construct an instance with the default recoverer which simply logs the faile... | public void adapt(List<Message<?>> messages, List<ConsumerRecord<K, V>> records, @Nullable Acknowledgment ack,
@Nullable Consumer<?, ?> consumer, Callback<K, V> callback) {
for (int i = 0; i < messages.size(); i++) {
Message<?> message = messages.get(i);
try {
callback.invoke(records.get(i), ack, consum... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\DefaultBatchToRecordAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static final class CouchbaseUrlCondition {
}
@ConditionalOnBean(CouchbaseConnectionDetails.class)
private static final class CouchbaseConnectionDetailsCondition {
}
}
/**
* Adapts {@link CouchbaseProperties} to {@link CouchbaseConnectionDetails}.
*/
static final class PropertiesCouchbaseConn... | }
@Override
public @Nullable String getPassword() {
return this.properties.getPassword();
}
@Override
public @Nullable SslBundle getSslBundle() {
Ssl ssl = this.properties.getEnv().getSsl();
if (!ssl.getEnabled()) {
return null;
}
if (StringUtils.hasLength(ssl.getBundle())) {
Assert.n... | repos\spring-boot-4.0.1\module\spring-boot-couchbase\src\main\java\org\springframework\boot\couchbase\autoconfigure\CouchbaseAutoConfiguration.java | 2 |
请完成以下Java代码 | public void setParent_ID (int Parent_ID)
{
if (Parent_ID < 1)
set_Value (COLUMNNAME_Parent_ID, null);
else
set_Value (COLUMNNAME_Parent_ID, Integer.valueOf(Parent_ID));
}
/** Get Parent.
@return Parent of Entity
*/
@Override
public int getParent_ID ()
{
Integer ii = (Integer)get_Value(COLUMNN... | set_Value (COLUMNNAME_Root_ID, null);
else
set_Value (COLUMNNAME_Root_ID, Integer.valueOf(Root_ID));
}
/** Get Root Entry.
@return Root Entry */
@Override
public int getRoot_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Root_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** S... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Record_Access.java | 1 |
请完成以下Java代码 | public void warning(SAXParseException spe) {
LOGGER.warning(getParseExceptionInfo(spe));
}
public void error(SAXParseException spe) throws SAXException {
String message = "Error: " + getParseExceptionInfo(spe);
throw new SAXException(message);
}
public void fatalError(SAXParseExcepti... | try {
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
documentBuilder.setErrorHandler(new DomErrorHandler());
return new DomDocumentImpl(documentBuilder.parse(inputStream));
} catch (ParserConfigurationException e) {
throw new ModelParseException("ParserConfigu... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\DomUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CommissionHierarchyFactory
{
// very crude but simple implementation; expand and make more efficient as needed
@NonNull
public Hierarchy createForCustomer(@NonNull final BPartnerId bPartnerId, @NonNull final BPartnerId salesRepId)
{
if (bPartnerId.equals(salesRepId))
{
return createFor(salesRepI... | final I_C_BPartner bPartnerRecord = loadOutOfTrx(bPartnerId, I_C_BPartner.class);
final BPartnerId parentBPartnerId = BPartnerId.ofRepoIdOrNull(bPartnerRecord.getC_BPartner_SalesRep_ID());
if (parentBPartnerId == null || seenBPartnerIds.contains(parentBPartnerId))
{
hierarchyBuilder.addChildren(node(bPartnerI... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\hierarchy\CommissionHierarchyFactory.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public UserResponse updateUser(@ApiParam(name = "userId") @PathVariable String userId, @RequestBody UserRequest userRequest) {
User user = getUserFromRequest(userId);
if (userRequest.isEmailChanged()) {
user.setEmail(userRequest.getEmail());
}
if (userRequest.isFirstNameChang... | return restResponseFactory.createUserResponse(user, false);
}
@ApiOperation(value = "Delete a user", tags = { "Users" }, code = 204)
@ApiResponses(value = {
@ApiResponse(code = 204, message = "Indicates the user was found and has been deleted. Response-body is intentionally empty."),
... | repos\flowable-engine-main\modules\flowable-idm-rest\src\main\java\org\flowable\idm\rest\service\api\user\UserResource.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<QueryVariableValue> getQueryVariableValues() {
return queryVariableValues;
}
public boolean hasValueComparisonQueryVariables() {
for (QueryVariableValue qvv : queryVariableValues) {
if (!QueryOperator.EXISTS.toString().equals(qvv.getOperator()) && !QueryOperator.NOT_... | }
}
return false;
}
public boolean hasNonLocalQueryVariableValue() {
for (QueryVariableValue qvv : queryVariableValues) {
if (!qvv.isLocal()) {
return true;
}
}
return false;
}
} | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\AbstractVariableQueryImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private RegistrationStore registrationStore() {
return redisConfiguration.isPresent() ?
new TbLwM2mRedisRegistrationStore(config, getConnectionFactory(), modelProvider) :
new TbInMemoryRegistrationStore(config, config.getCleanPeriodInSec(), modelProvider);
}
@Bean
pr... | }
@Bean
private TbLwM2MClientOtaInfoStore otaStore() {
return redisConfiguration.isPresent() ? new TbLwM2mRedisClientOtaInfoStore(getConnectionFactory()) : new TbDummyLwM2MClientOtaInfoStore();
}
@Bean
private TbLwM2MDtlsSessionStore sessionStore() {
return redisConfiguration.isPre... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\store\TbLwM2mStoreFactory.java | 2 |
请完成以下Java代码 | public void removeVariables() {
Iterator<T> valuesIt = getVariablesMap().values().iterator();
removedVariables.putAll(variables);
while (valuesIt.hasNext()) {
T nextVariable = valuesIt.next();
valuesIt.remove();
for (VariableStoreObserver<T> observer : observers) {
observer.onRe... | void onAdd(T variable);
void onRemove(T variable);
}
public static interface VariablesProvider<T extends CoreVariableInstance> {
Collection<T> provideVariables();
Collection<T> provideVariables(Collection<String> variableNames);
}
public boolean isRemoved(String variableName) {
return remo... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\variable\scope\VariableStore.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Access route(String pattern) {
RSocketMessageHandler handler = getBean(RSocketMessageHandler.class);
PayloadExchangeMatcher matcher = new RoutePayloadExchangeMatcher(handler.getMetadataExtractor(),
handler.getRouteMatcher(), pattern);
return matcher(matcher);
}
public Access matcher(PayloadExc... | }
public AuthorizePayloadsSpec access(
ReactiveAuthorizationManager<PayloadExchangeAuthorizationContext> authorization) {
AuthorizePayloadsSpec.this.authzBuilder
.add(new PayloadExchangeMatcherEntry<>(this.matcher, authorization));
return AuthorizePayloadsSpec.this;
}
public AuthorizePayloa... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\rsocket\RSocketSecurity.java | 2 |
请完成以下Java代码 | public final void putValue(String key, Object value)
{
// immutable, nothing to do
}
@Override
public final void setEnabled(boolean enabled)
{
// immutable, nothing to do
}
@Override
public final boolean isEnabled()
{
return true; | }
@Override
public final void addPropertyChangeListener(PropertyChangeListener listener)
{
// immutable, nothing to do
}
@Override
public final void removePropertyChangeListener(PropertyChangeListener listener)
{
// immutable, nothing to do
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\UIAction.java | 1 |
请完成以下Java代码 | public final class ImportRecordsSelection
{
@NonNull @Getter private final String importTableName;
@NonNull private final String importKeyColumnName;
@NonNull private final ClientId clientId;
@Nullable @Getter @With private final PInstanceId selectionId;
@Getter @With private final boolean empty;
/**
* @retur... | return "1=2";
}
else
{
// AD_Client
whereClause.append(importTableAliasWithDot).append(ImportTableDescriptor.COLUMNNAME_AD_Client_ID).append("=").append(clientId.getRepoId());
// Selection_ID
if (selectionId != null)
{
final String importKeyColumnNameFQ = importTableAliasWithDot + importKeyCol... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\processing\ImportRecordsSelection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static Map<String, String> getAllRequestParam(final byte[] body) throws IOException {
if(body==null){
return null;
}
String wholeStr = new String(body);
// 转化成json对象
return JSONObject.parseObject(wholeStr.toString(), Map.class);
}
/**
* 将URL请求参数转换... | return result;
}
String param = "";
try {
param = URLDecoder.decode(queryString, "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String[] params = param.split("&");
for (String s : params) {
int index... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\sign\util\HttpUtils.java | 2 |
请完成以下Java代码 | public boolean remove(Object o)
{
return pipeList.remove(o);
}
@Override
public boolean containsAll(Collection<?> c)
{
return pipeList.containsAll(c);
}
@Override
public boolean addAll(Collection<? extends Pipe<List<IWord>, List<IWord>>> c)
{
return pipeList... | @Override
public void add(int index, Pipe<List<IWord>, List<IWord>> element)
{
pipeList.add(index, element);
}
@Override
public Pipe<List<IWord>, List<IWord>> remove(int index)
{
return pipeList.remove(index);
}
@Override
public int indexOf(Object o)
{
r... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\SegmentPipeline.java | 1 |
请完成以下Java代码 | private static List<Optional<? extends AbstractTsKvEntity>> toResultList(EntityId entityId, String key, List<TimescaleTsKvEntity> timescaleTsKvEntities) {
if (!CollectionUtils.isEmpty(timescaleTsKvEntities)) {
List<Optional<? extends AbstractTsKvEntity>> result = new ArrayList<>();
times... | switch (aggregation) {
case AVG:
return aggregationRepository.findAvg(entityId, keyId, timeBucket, startTs, endTs);
case MAX:
return aggregationRepository.findMax(entityId, keyId, timeBucket, startTs, endTs);
case MIN:
return aggregatio... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sqlts\timescale\TimescaleTimeseriesDao.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public List<String> getCategoryIn() {
return categoryIn;
}
public void setCategoryIn(List<String> categoryIn) {
this.categoryIn = categoryIn;... | this.rootScopeId = rootScopeId;
}
public String getParentScopeId() {
return parentScopeId;
}
public void setParentScopeId(String parentScopeId) {
this.parentScopeId = parentScopeId;
}
public Set<String> getScopeIds() {
return scopeIds;
}
public void setScopeId... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskQueryRequest.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public HistoricTaskLogEntryBuilder executionId(String executionId) {
this.executionId = executionId;
return this;
}
@Override
public HistoricTaskLogEntryBuilder scopeId(String scopeId) {
this.scopeId = scopeId;
return this;
}
@Override
public HistoricTaskLogEntr... | public String getProcessInstanceId() {
return processInstanceId;
}
@Override
public String getProcessDefinitionId() {
return processDefinitionId;
}
@Override
public String getScopeId() {
return scopeId;
}
@Override
public String getScopeDefinitionId() {
... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\BaseHistoricTaskLogEntryBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | static class JacksonJsonEncoderSupplierConfiguration {
@Bean
JsonEncoderSupplier jacksonJsonEncoderSupplier(JsonMapper jsonMapper) {
return () -> new JacksonJsonEncoder(jsonMapper);
}
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnBean(ObjectMapper.class)
@Conditional(NoJacksonOrJackson2Prefer... | }
@ConditionalOnMissingClass("tools.jackson.databind.json.JsonMapper")
static class NoJackson {
}
@ConditionalOnProperty(name = "spring.graphql.rsocket.preferred-json-mapper", havingValue = "jackson2")
static class Jackson2Preferred {
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-graphql\src\main\java\org\springframework\boot\graphql\autoconfigure\rsocket\GraphQlRSocketAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void loadWebParsers() {
this.parsers.put(Elements.DEBUG, new DebugBeanDefinitionParser());
this.parsers.put(Elements.HTTP, new HttpSecurityBeanDefinitionParser());
this.parsers.put(Elements.HTTP_FIREWALL, new HttpFirewallBeanDefinitionParser());
this.parsers.put(Elements.FILTER_SECURITY_METADATA_SOURCE,... | * breaks.
* @param element the element that is to be parsed next
* @return true if we find a schema declaration that matches
*/
private boolean namespaceMatchesVersion(Element element) {
return matchesVersionInternal(element)
&& matchesVersionInternal(element.getOwnerDocument().getDocumentElement());
}
... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\SecurityNamespaceHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Book implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String title;
private String isbn;
@Enumerated(EnumType.STRING)
private BookStatus status;
public ... | public String getIsbn() {
return isbn;
}
public void setIsbn(String isbn) {
this.isbn = isbn;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", title=" + title
+ ", isbn=" + isbn + ", status=" + status + '}';
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootMySqlSkipLocked\src\main\java\com\bookstore\entity\Book.java | 2 |
请完成以下Java代码 | public static String certTrimNewLines(String input) {
return input.replaceAll("-----BEGIN CERTIFICATE-----", "")
.replaceAll("\n", "")
.replaceAll("\r", "")
.replaceAll("-----END CERTIFICATE-----", "");
}
public static String certTrimNewLinesForChainInDev... | public static String getSha3Hash(String data) {
String trimmedData = certTrimNewLines(data);
byte[] dataBytes = trimmedData.getBytes();
SHA3Digest md = new SHA3Digest(256);
md.reset();
md.update(dataBytes, 0, dataBytes.length);
byte[] hashedBytes = new byte[256 / 8];
... | repos\thingsboard-master\common\message\src\main\java\org\thingsboard\server\common\msg\EncryptionUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String uri() {
return obtain(AtlasProperties::getUri, AtlasConfig.super::uri);
}
@Override
public Duration meterTTL() {
return obtain(AtlasProperties::getMeterTimeToLive, AtlasConfig.super::meterTTL);
}
@Override
public boolean lwcEnabled() {
return obtain(AtlasProperties::isLwcEnabled, AtlasConfig... | @Override
public Duration configRefreshFrequency() {
return obtain(AtlasProperties::getConfigRefreshFrequency, AtlasConfig.super::configRefreshFrequency);
}
@Override
public Duration configTTL() {
return obtain(AtlasProperties::getConfigTimeToLive, AtlasConfig.super::configTTL);
}
@Override
public String c... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\atlas\AtlasPropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public class ResponseData<T> implements Serializable {
/**
* 响应状态码
*/
private Integer code;
/**
* 响应信息
*/
private String message;
/**
* 响应对象
*/
private T data;
private ResponseData() {
}
private ResponseData(T data) {
this.data = data;
}... | }
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public static ResponseData success() {
return new ResponseData(ResponseCode.SUCCESS.getCode(), ResponseCode.SUCCESS.getMessage(), null);
}
public static <E> ResponseData<E> su... | repos\spring-boot-quick-master\quick-flowable\src\main\java\com\quick\flowable\common\ResponseData.java | 1 |
请完成以下Java代码 | class ServletComponentScanRegistrar implements ImportBeanDefinitionRegistrar {
private static final String BEAN_NAME = "servletComponentRegisteringPostProcessor";
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
Set<String> packagesToScan... | }
if (packagesToScan.isEmpty()) {
packagesToScan.add(ClassUtils.getPackageName(metadata.getClassName()));
}
return packagesToScan;
}
static final class ServletComponentRegisteringPostProcessorBeanDefinition extends RootBeanDefinition {
private final Set<String> packageNames = new LinkedHashSet<>();
Se... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\context\ServletComponentScanRegistrar.java | 1 |
请完成以下Java代码 | public TaxCategoryId getTaxCategoryId(@NonNull final I_M_ProductPrice productPrice)
{
return getTaxCategoryIdOptional(productPrice)
.orElseThrow(() -> new AdempiereException(msgBL.getTranslatableMsgText(MSG_NO_C_TAX_CATEGORY_FOR_PRODUCT_PRICE))
.appendParametersToMessage()
.setParameter("productPrice... | @NonNull
private LookupTaxCategoryRequest createLookupTaxCategoryRequest(@NonNull final I_M_ProductPrice productPrice)
{
final ProductId productId = ProductId.ofRepoId(productPrice.getM_Product_ID());
final PriceListVersionId priceListVersionId = PriceListVersionId.ofRepoId(productPrice.getM_PriceList_Version_ID(... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\tax\ProductTaxCategoryService.java | 1 |
请完成以下Java代码 | public static Path fileOutOnePath() throws URISyntaxException {
URI uri = ClassLoader.getSystemResource(Constants.CSV_ONE).toURI();
return Paths.get(uri);
}
// Read Files
public static Path twoColumnCsvPath() throws URISyntaxException {
URI uri = ClassLoader.getSystemResource(Const... | }
// Dummy Data for Writing
public static List<String[]> twoColumnCsvString() {
List<String[]> list = new ArrayList<>();
list.add(new String[]{"ColA", "ColB"});
list.add(new String[]{"A", "B"});
return list;
}
public static List<String[]> fourColumnCsvString() {
... | repos\tutorials-master\libraries-data-io\src\main\java\com\baeldung\libraries\opencsv\helpers\Helpers.java | 1 |
请完成以下Java代码 | public class ApplicationReader {
private List<ApplicationEntryDiscovery> applicationEntryDiscoveries;
public ApplicationReader(List<ApplicationEntryDiscovery> applicationEntryDiscoveries) {
this.applicationEntryDiscoveries = applicationEntryDiscoveries;
}
public ApplicationContent read(InputS... | application.add(
new ApplicationEntry(
applicationEntryDiscovery.getEntryType(),
new FileContent(currentEntry.getName(), readBytes(zipInputStream))
)
)
);
... | repos\Activiti-develop\activiti-core-common\activiti-spring-application\src\main\java\org\activiti\application\ApplicationReader.java | 1 |
请完成以下Java代码 | public class CatTracer implements Tracer {
public ScopeManager scopeManager() {
return null;
}
public Span activeSpan() {
return null;
}
public Scope activateSpan(Span span) {
return null;
}
public SpanBuilder buildSpan(String operationName) { | return new CatSpanBuilder(operationName);
}
public <C> void inject(SpanContext spanContext, Format<C> format, C carrier) {
}
public <C> SpanContext extract(Format<C> format, C carrier) {
return null;
}
public void close() {
}
} | repos\SpringBoot-Labs-master\lab-61\lab-61-cat-opentracing\src\main\java\cn\iocoder\springboot\lab61\cat\opentracing\CatTracer.java | 1 |
请完成以下Java代码 | public <V> V get(Object key) {
return hasKey(key) ? (V) this.context.get(key) : null;
}
@Override
public boolean hasKey(Object key) {
Assert.notNull(key, "key cannot be null");
return this.context.containsKey(key);
}
/**
* Returns a new {@link Builder}.
* @return the {@link Builder}
*/
public static... | */
public static final class Builder extends AbstractBuilder<DefaultOAuth2TokenContext, Builder> {
private Builder() {
}
/**
* Builds a new {@link DefaultOAuth2TokenContext}.
* @return the {@link DefaultOAuth2TokenContext}
*/
@Override
public DefaultOAuth2TokenContext build() {
return new Defau... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\token\DefaultOAuth2TokenContext.java | 1 |
请完成以下Java代码 | public class PrinterHW implements Serializable
{
/**
*
*/
private static final long serialVersionUID = 1L;
private String name;
private List<PrinterHWMediaSize> printerHWMediaSizes;
private List<PrinterHWMediaTray> printerHWMediaTrays;
public PrinterHW()
{
super();
}
public String getName()
{
retu... | return "PrinterHWMediaSize [name=" + name + ", isDefault=" + isDefault + "]";
}
}
/**
* Printer HW Media Tray Object
*
* @author al
*/
public static class PrinterHWMediaTray implements Serializable
{
/**
*
*/
private static final long serialVersionUID = -1833627999553124042L;
private String ... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\PrinterHW.java | 1 |
请完成以下Java代码 | public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public void setContent(InputStream content, Integer length) {
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
try {
... | } catch (IOException e) {
LOG.error("异常", e);
}
}
/**
* 如果成功,则可以靠这个方法将数据输出
*
* @param out 调用者给的输出流
* @throws IOException 写流出现异常
*/
public void writeTo(OutputStream out) throws IOException {
out.write(this.content);
out.flush();
out.close(... | repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\response\DownloadMediaResponse.java | 1 |
请完成以下Java代码 | public void setVariables(String processId, Map<String, Object> variables) {
Map<String, TypedValueField> typedValueDtoMap = typedValues.serializeVariables(variables);
SetVariablesRequestDto payload = new SetVariablesRequestDto(workerId, typedValueDtoMap);
String resourcePath = SET_VARIABLES_RESOURCE_PATH.re... | public byte[] getLocalBinaryVariable(String variableName, String executionId) {
String resourcePath = getBaseUrl() + GET_BINARY_VARIABLE
.replace(ID_PATH_PARAM, executionId)
.replace(NAME_PATH_PARAM, variableName);
return engineInteraction.getRequest(resourcePath);
}
public Stri... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\EngineClient.java | 1 |
请完成以下Java代码 | public void perform()
{
pickingCandidates.stream()
.filter(this::isEligible)
.forEach(this::close);
//
// Release the picking slots
final Set<PickingSlotId> pickingSlotIds = PickingCandidate.extractPickingSlotIds(pickingCandidates);
huPickingSlotBL.releasePickingSlotsIfPossible(pickingSlotIds);
}
... | changeStatusToProcessedAndSave(pickingCandidate);
}
catch (final Exception ex)
{
if (failOnError)
{
throw AdempiereException.wrapIfNeeded(ex).setParameter("pickingCandidate", pickingCandidate);
}
else
{
logger.warn("Failed closing {}. Skipped", pickingCandidate, ex);
}
}
}
private v... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\ClosePickingCandidateCommand.java | 1 |
请完成以下Java代码 | public class CustomPair {
private String key;
private String value;
public CustomPair(String key, String value) {
super();
this.key = key;
this.value = value;
}
public String getKey() {
return key;
} | public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public Object[] getPair() {
return new Object[] { this.key, this.value};
}
} | repos\tutorials-master\core-java-modules\core-java-methods\src\main\java\com\baeldung\pairs\CustomPair.java | 1 |
请完成以下Java代码 | private static String getStrNum(int num) {
String s = String.format("%0" + NUM_LENGTH + "d", num);
return s;
}
/**
* 递增获取下个数字
*
* @param num
* @return
*/
private static int getNextNum(int num) {
num++;
return num;
}
/**
* 递增获取下个字母
*
* @param num
* @return
*/
private static char get... | maxNum.append("9");
}
return Integer.parseInt(maxNum.toString());
}
public static String[] cutYouBianCode(String code){
if(code==null || StringUtil.isNullOrEmpty(code)){
return null;
}else{
//获取标准长度为numLength+1,截取的数量为code.length/numLength+1
int c = code.length()/(NUM_LENGTH +1);
String[] cutcode =... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\YouBianCodeUtil.java | 1 |
请完成以下Java代码 | private void assertPresent(boolean present, Range<?> range) {
Assert.state(present, () -> "Could not get random number for range '" + range + "'");
}
private Object getRandomBytes() {
byte[] bytes = new byte[16];
getSource().nextBytes(bytes);
return HexFormat.of().withLowerCase().formatHex(bytes);
}
/**
... | private final String value;
private final T min;
private final T max;
private Range(String value, T min, T max) {
this.value = value;
this.min = min;
this.max = max;
}
T getMin() {
return this.min;
}
T getMax() {
return this.max;
}
@Override
public String toString() {
return ... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\RandomValuePropertySource.java | 1 |
请完成以下Java代码 | public class CorporateAction9 {
@XmlElement(name = "EvtTp", required = true)
protected String evtTp;
@XmlElement(name = "EvtId", required = true)
protected String evtId;
/**
* Gets the value of the evtTp property.
*
* @return
* possible object is
* {@link String }... | * @return
* possible object is
* {@link String }
*
*/
public String getEvtId() {
return evtId;
}
/**
* Sets the value of the evtId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void ... | 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\CorporateAction9.java | 1 |
请完成以下Java代码 | private boolean canReadProcessInstance(org.activiti.engine.runtime.ProcessInstance processInstance) {
return (
securityPoliciesManager.canRead(processInstance.getProcessDefinitionKey()) &&
(securityManager.getAuthenticatedUserId().equals(processInstance.getStartUserId()) ||
... | taskQuery
.or()
.taskCandidateOrAssigned(
securityManager.getAuthenticatedUserId(),
securityManager.getAuthenticatedUserGroups()
)
.taskOwner(authenticatedUserId)
.endOr();
return taskQuery.count() > 0;
}
priva... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\impl\ProcessRuntimeImpl.java | 1 |
请完成以下Java代码 | public List<JSONAttachment> getAttachments(
@PathVariable("windowId") final String windowIdStr //
, @PathVariable("documentId") final String documentId //
)
{
userSession.assertLoggedIn();
final DocumentPath documentPath = DocumentPath.rootDocumentPath(WindowId.fromJson(windowIdStr), documentId);
if (doc... | return toResponseBody(entry);
}
@NonNull
private static ResponseEntity<StreamingResponseBody> toResponseBody(@NonNull final IDocumentAttachmentEntry entry)
{
final AttachmentEntryType type = entry.getType();
switch (type)
{
case Data:
return DocumentAttachmentRestControllerHelper.extractResponseEntryF... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\attachments\DocumentAttachmentsRestController.java | 1 |
请完成以下Java代码 | public String getNewState() {
return PlanItemInstanceState.ACTIVE;
}
@Override
public String getLifeCycleTransition() {
return PlanItemTransition.START;
}
@Override
protected void internalExecute() {
// Sentries are not needed to be kept around, as the plan item... | } else if (activityBehavior instanceof CoreCmmnActivityBehavior) {
((CoreCmmnActivityBehavior) activityBehavior).execute(commandContext, planItemInstanceEntity);
} else if (activityBehavior != null) {
activityBehavior.execute(planItemInstanceEntity);
} else {
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\StartPlanItemInstanceOperation.java | 1 |
请完成以下Spring Boot application配置 | # Local server port
server.port=8443
server.ssl.enabled=true
#
#
## The path to the keystore containing the certificate
server.ssl.key-store = src/main/resources/securePC.p12
#
## The format used for the keystore. It could be set to JKS in case it is a JKS file
server.ssl.key-store-type = PKCS12
#
## The password use... | iver
#spring.datasource.url=jdbc:mysql://localhost:3306/management
#spring.datasource.username=root
#spring.datasource.password=posilka2020
#spring.jpa.hibernate.ddl-auto=update
#spring.jpa.show-sql=true | repos\SpringBoot-Projects-FullStack-master\Part-6 Spring Boot Security\7. SpringSecureDB\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public Optional<Product> importProduct(final SyncProduct syncProduct)
{
final Product product = productsRepo.findByUuid(syncProduct.getUuid());
return importProduct(syncProduct, product);
}
/**
* Imports the given <code>syncProduct</code>, updating the given <code>product</code> if feasible.
* If it's not f... | ProductTrl productTrl = productTrls.remove(language);
if (productTrl == null)
{
productTrl = new ProductTrl();
productTrl.setLanguage(language);
productTrl.setRecord(product);
}
productTrl.setName(nameTrl);
productTrlsRepo.save(productTrl);
logger.debug("Imported: {}", productTrl);
}
... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\SyncProductImportService.java | 2 |
请完成以下Java代码 | public void validateBOMVersions(final I_PP_Product_BOM bom)
{
final int productId = bom.getM_Product_ID();
final ProductBOMVersionsId bomVersionsId = ProductBOMVersionsId.ofRepoId(bom.getPP_Product_BOMVersions_ID());
final I_PP_Product_BOMVersions bomVersions = bomVersionsDAO.getBOMVersions(bomVersionsId);
... | ifColumnsChanged = { I_PP_Product_BOM.COLUMNNAME_M_AttributeSetInstance_ID })
public void validateBOMAttributes(final I_PP_Product_BOM productBom)
{
final ProductBOMVersionsId productBOMVersionsId = ProductBOMVersionsId.ofRepoId(productBom.getPP_Product_BOMVersions_ID());
productPlanningDAO.retrieveProductPlanni... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\validator\PP_Product_BOM.java | 1 |
请完成以下Java代码 | public Integer getGiftIntegration() {
return giftIntegration;
}
public void setGiftIntegration(Integer giftIntegration) {
this.giftIntegration = giftIntegration;
}
public Integer getGiftGrowth() {
return giftGrowth;
}
public void setGiftGrowth(Integer giftGrowth) {
... | sb.append(", productQuantity=").append(productQuantity);
sb.append(", productSkuId=").append(productSkuId);
sb.append(", productSkuCode=").append(productSkuCode);
sb.append(", productCategoryId=").append(productCategoryId);
sb.append(", promotionName=").append(promotionName);
sb.... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsOrderItem.java | 1 |
请完成以下Java代码 | public static class BPartnerContact
{
private final int C_BPartner_ID;
private final int AD_User_ID;
public BPartnerContact(int cBPartnerID, int aDUserID)
{
super();
C_BPartner_ID = cBPartnerID;
AD_User_ID = aDUserID;
}
public int getC_BPartner_ID()
{
return C_BPartner_ID; | }
public int getAD_User_ID()
{
return AD_User_ID;
}
@Override
public String toString()
{
return "BPartnerContact [C_BPartner_ID=" + C_BPartner_ID
+ ", AD_User_ID=" + AD_User_ID + "]";
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\callcenter\form\CalloutR_Group.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Attribute
{
public static final Comparator<Attribute> ORDER_BY_DisplayName = Comparator.<Attribute, String>comparing(attribute -> attribute.getDisplayName().getDefaultValue())
.thenComparing(Attribute::getAttributeId);
@NonNull AttributeId attributeId;
@NonNull AttributeCode attributeCode;
@NonNull... | @Nullable AttributeValuesOrderByType listOrderBy;
public boolean isHighVolumeValuesList()
{
return this.isHighVolume && valueType.isList();
}
public int getNumberDisplayType()
{
return isInteger(uomId)
? DisplayType.Integer
: DisplayType.Number;
}
public static boolean isInteger(@Nullable final Uo... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\Attribute.java | 2 |
请完成以下Java代码 | public List<DefaultMetadataElement> getJavaVersions() {
return this.javaVersions;
}
public List<DefaultMetadataElement> getLanguages() {
return this.languages;
}
public List<DefaultMetadataElement> getConfigurationFileFormats() {
return this.configurationFileFormats;
}
public List<DefaultMetadataElement>... | return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getValue() {
return this.value;
}
public void ... | repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\InitializrProperties.java | 1 |
请完成以下Java代码 | public @Nullable T getListener() {
return this.listener;
}
@Override
protected String getDescription() {
Assert.notNull(this.listener, "'listener' must not be null");
return "listener " + this.listener;
}
@Override
protected void register(String description, ServletContext servletContext) {
try {
ser... | * @param listener the listener to test
* @return if the listener is of a supported type
*/
public static boolean isSupportedType(EventListener listener) {
for (Class<?> type : SUPPORTED_TYPES) {
if (ClassUtils.isAssignableValue(type, listener)) {
return true;
}
}
return false;
}
/**
* Return t... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletListenerRegistrationBean.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CommonResult cancelOrder(Long orderId) {
portalOrderService.sendDelayMessageCancelOrder(orderId);
return CommonResult.success(null);
}
@ApiOperation("按状态分页获取用户订单列表")
@ApiImplicitParam(name = "status", value = "订单状态:-1->全部;0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭",
defaultValue ... | }
@ApiOperation("用户确认收货")
@RequestMapping(value = "/confirmReceiveOrder", method = RequestMethod.POST)
@ResponseBody
public CommonResult confirmReceiveOrder(Long orderId) {
portalOrderService.confirmReceiveOrder(orderId);
return CommonResult.success(null);
}
@ApiOperation("用户删除... | repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\controller\OmsPortalOrderController.java | 2 |
请完成以下Java代码 | private StockQtyAndUOMQty getQtyInvoiceable(@NonNull final InvoiceCandidateId invoiceCandidateId)
{
final StockQtyAndUOMQty qtyInvoiceable = _ic2QtyInvoiceable.get(invoiceCandidateId);
return Check.assumeNotNull(qtyInvoiceable, "qtyInvoiceable not null for invoiceCandidateId={}", invoiceCandidateId);
}
private ... | if (cand.isManual())
{
return true;
}
// We can consider those candidates which have a SplitAmt set to be amount based invoices
final BigDecimal splitAmt = cand.getSplitAmt();
if (splitAmt.signum() != 0)
{
return true;
}
// More ideas to check:
// * UOM shall be stuck?!
return false;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\impl\aggregator\standard\InvoiceCandidateWithInOutLineAggregator.java | 1 |
请完成以下Java代码 | public void setExecutionId(String executionId) {
this.executionId = executionId;
}
@Override
public String getActivityId() {
return activityId;
}
@Override
public void setActivityId(String activityId) {
this.activityId = activityId;
}
@Override
public Strin... | @Override
public void setExecutionJson(String executionJson) {
this.executionJson = executionJson;
}
@Override
public String getDecisionKey() {
return decisionKey;
}
public void setDecisionKey(String decisionKey) {
this.decisionKey = decisionKey;
}
@Override
... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\HistoricDecisionExecutionEntityImpl.java | 1 |
请完成以下Java代码 | public String getProfileInfo ()
{
return (String)get_Value(COLUMNNAME_ProfileInfo);
}
/** Set Issue Project.
@param R_IssueProject_ID
Implementation Projects
*/
public void setR_IssueProject_ID (int R_IssueProject_ID)
{
if (R_IssueProject_ID < 1)
set_ValueNoCheck (COLUMNNAME_R_IssueProject_ID, nu... | /** Implementation = I */
public static final String SYSTEMSTATUS_Implementation = "I";
/** Production = P */
public static final String SYSTEMSTATUS_Production = "P";
/** Set System Status.
@param SystemStatus
Status of the system - Support priority depends on system status
*/
public void setSystemStatus ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueProject.java | 1 |
请在Spring Boot框架中完成以下Java代码 | CompositeHandlerExceptionResolver compositeHandlerExceptionResolver() {
return new CompositeHandlerExceptionResolver();
}
@Bean
@ConditionalOnMissingBean({ RequestContextListener.class, RequestContextFilter.class })
RequestContextFilter requestContextFilter() {
return new OrderedRequestContextFilter();
}
/*... | ManagementErrorPageCustomizer(WebProperties properties) {
this.properties = properties;
}
@Override
public void customize(ConfigurableServletWebServerFactory factory) {
factory.addErrorPages(new ErrorPage(this.properties.getError().getPath()));
}
@Override
public int getOrder() {
return 10; // Ru... | repos\spring-boot-4.0.1\module\spring-boot-webmvc\src\main\java\org\springframework\boot\webmvc\autoconfigure\actuate\web\WebMvcEndpointChildContextConfiguration.java | 2 |
请完成以下Java代码 | public boolean hasProcessedReceiptSchedules(final I_C_Order order)
{
// services
final IOrderDAO orderDAO = Services.get(IOrderDAO.class);
final IReceiptScheduleDAO receiptScheduleDAO = Services.get(IReceiptScheduleDAO.class);
final List<I_C_OrderLine> orderLines = orderDAO.retrieveOrderLines(order);
for (f... | final IReceiptScheduleBL receiptScheduleBL = Services.get(IReceiptScheduleBL.class);
final List<I_C_OrderLine> orderLines = orderDAO.retrieveOrderLines(order);
for (final I_C_OrderLine orderLine : orderLines)
{
final I_M_ReceiptSchedule receiptSchedule = receiptScheduleDAO.retrieveForRecord(orderLine);
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\C_Order_ReceiptSchedule.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void updateCommissionShares(@NonNull final CommissionTriggerChange change)
{
try
{
final ImmutableList<CommissionType> commissionTypes = CollectionUtils.extractDistinctElements(
change.getInstanceToUpdate().getShares(),
share -> share.getConfig().getCommissionType());
for (final CommissionT... | final CommissionAlgorithmFactory commissionAlgorithmFactory = commissionType2AlgorithmFactory.get(commissionType);
if (commissionAlgorithmFactory != null)
{
return commissionAlgorithmFactory.instantiateAlgorithm();
}
final Class<? extends CommissionAlgorithm> algorithmClass = commissionType.getAlgorithmCla... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\CommissionAlgorithmInvoker.java | 2 |
请完成以下Java代码 | public class MySerializationUtils {
public static <T extends Serializable> byte[] serialize(T obj) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(obj);
oos.close();
return ... | if (!serializable) {
return false;
}
Field[] declaredFields = it.getDeclaredFields();
for (Field field : declaredFields) {
if (Modifier.isVolatile(field.getModifiers()) || Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers())) {
... | repos\tutorials-master\core-java-modules\core-java-serialization\src\main\java\com\baeldung\util\MySerializationUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ChatRoomServerEndpoint {
private static final Logger logger = LoggerFactory.getLogger(ChatRoomServerEndpoint.class);
@OnOpen
public void openSession(@PathParam("username") String username, Session session) {
ONLINE_USER_SESSIONS.put(username, session);
String message = "欢迎用户[" ... | } catch (IOException e) {
logger.error("onClose error",e);
}
}
@OnError
public void onError(Session session, Throwable throwable) {
try {
session.close();
} catch (IOException e) {
logger.error("onError excepiton",e);
}
logger.info... | repos\spring-boot-leaning-master\2.x_42_courses\第 2-10 课: 使用 Spring Boot WebSocket 创建聊天室\spring-boot-websocket\src\main\java\com\neo\ChatRoomServerEndpoint.java | 2 |
请完成以下Java代码 | public PPOrderCost addingAccumulatedAmountAndQty(
@NonNull final CostAmount amt,
@NonNull final Quantity qty,
@NonNull final QuantityUOMConverter uomConverter)
{
if (amt.isZero() && qty.isZero())
{
return this;
}
final boolean amtIsPositiveOrZero = amt.signum() >= 0;
final boolean amtIsNotZero =... | {
if (this.getPrice().equals(newPrice))
{
return this;
}
return toBuilder().price(newPrice).build();
}
/* package */void setPostCalculationAmount(@NonNull final CostAmount postCalculationAmount)
{
this.postCalculationAmount = postCalculationAmount;
}
/* package */void setPostCalculationAmountAsAccu... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\PPOrderCost.java | 1 |
请完成以下Java代码 | public class DeptrackFrontendServiceResource extends CRUDKubernetesDependentResource<Service, DeptrackResource> {
public static final String COMPONENT = "frontend-service";
private Service template;
public DeptrackFrontendServiceResource() {
super(Service.class);
this.template = BuilderHel... | .endSpec()
.build();
}
// static class Discriminator implements ResourceDiscriminator<Service,DeptrackResource> {
// @Override
// public Optional<Service> distinguish(Class<Service> resource, DeptrackResource primary, Context<DeptrackResource> context) {
// var ies = context.e... | repos\tutorials-master\kubernetes-modules\k8s-operator\src\main\java\com\baeldung\operators\deptrack\resources\deptrack\DeptrackFrontendServiceResource.java | 1 |
请完成以下Java代码 | public EncryptedDataType getEncryptedData() {
return encryptedData;
}
/**
* Sets the value of the encryptedData property.
*
* @param value
* allowed object is
* {@link EncryptedDataType }
*
*/
public void setEncryptedData(EncryptedDataType value) {
... | if (copy == null) {
return false;
} else {
return copy;
}
}
/**
* Sets the value of the copy property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setCopy(Boolean value) {
this.copy... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\PayloadType.java | 1 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.addValue(fetcher)
.toString();
}
@Override
public DocumentZoomIntoInfo getDocumentZoomInto(final int id)
{
final String tableName = fetcher.getLookupTableName()
.orElseThrow(() -> new IllegalStateException("Failed converting id=" ... | {
return null;
}
return lookupValue;
}
@Override
public @NonNull LookupValuesList findByIdsOrdered(final @NonNull Collection<?> ids)
{
final LookupDataSourceContext evalCtx = fetcher.newContextForFetchingByIds(ids)
.putShowInactive(true)
.build();
return fetcher.retrieveLookupValueByIdsInOrder(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LookupDataSourceAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JobAlarmer implements ApplicationContextAware, InitializingBean {
private static Logger logger = LoggerFactory.getLogger(JobAlarmer.class);
private ApplicationContext applicationContext;
private List<JobAlarm> jobAlarmList;
@Override
public void setApplicationContext(ApplicationContex... | */
public boolean alarm(XxlJobInfo info, XxlJobLog jobLog) {
boolean result = false;
if (jobAlarmList!=null && jobAlarmList.size()>0) {
result = true; // success means all-success
for (JobAlarm alarm: jobAlarmList) {
boolean resultItem = false;
... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\alarm\JobAlarmer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public long executeCount(CommandContext commandContext) {
return CommandContextUtil.getAppDefinitionEntityManager(commandContext).findAppDefinitionCountByQueryCriteria(this);
}
@Override
public List<AppDefinition> executeList(CommandContext commandContext) {
return CommandContextUtil.getApp... | public Integer getVersionLt() {
return versionLt;
}
public Integer getVersionLte() {
return versionLte;
}
public boolean isLatest() {
return latest;
}
public String getCategory() {
return category;
}
public String getCategoryLike() {
return cat... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\repository\AppDefinitionQueryImpl.java | 2 |
请完成以下Java代码 | public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
@Override
public String getProcessInstanceId() {
return processInstanceId;
}
@Override
public String getTaskId() {
return taskId;
}
public void setTaskId(... | sb.append(", revision=").append(revision);
sb.append(", type=").append(variableType != null ? variableType.getTypeName() : "null");
if (longValue != null) {
sb.append(", longValue=").append(longValue);
}
if (doubleValue != null) {
sb.append(", doubleValue=").appen... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricVariableInstanceEntity.java | 1 |
请完成以下Java代码 | public void setValue(Object value)
{
if (value == null)
m_oldText = "";
else
m_oldText = value.toString();
if (m_setting)
return;
super.setValue(m_oldText);
m_initialText = m_oldText;
// Always position Top
setCaretPosition(0);
} // setValue
/**
* Property Change Listener
* @param evt ... | fireVetoableChange(m_columnName, m_oldText, getText());
}
catch (PropertyVetoException pve) {}
m_setting = false;
} // keyReleased
/**
* Set Field/WindowNo for ValuePreference (NOP)
* @param mField field model
*/
@Override
public void setField (org.compiere.model.GridField mField)
{
m_mField = mFi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VText.java | 1 |
请完成以下Java代码 | public void setExecutionId(String executionId) {
this.executionId = executionId;
}
public String getProcessInstanceId() {
return processInstanceId;
}
@CamundaQueryParam("processInstanceId")
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
... | return VALID_SORT_BY_VALUES.contains(value);
}
@Override
protected EventSubscriptionQuery createNewQuery(ProcessEngine engine) {
return engine.getRuntimeService().createEventSubscriptionQuery();
}
@Override
protected void applyFilters(EventSubscriptionQuery query) {
if (eventSubscriptionId != null... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\EventSubscriptionQueryDto.java | 1 |
请完成以下Java代码 | public void setPA_SLA_Goal_ID (int PA_SLA_Goal_ID)
{
if (PA_SLA_Goal_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_SLA_Goal_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PA_SLA_Goal_ID, Integer.valueOf(PA_SLA_Goal_ID));
}
/** Get SLA Goal.
@return Service Level Agreement Goal
*/
public int getPA_SLA_Goal... | @param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_SLA_Measure.java | 1 |
请完成以下Java代码 | private static String bytesToHexString(byte[] src) {
StringBuilder stringBuilder = new StringBuilder();
if (src == null || src.length <= 0) {
return null;
}
for (int i = 0; i < src.length; i++) {
int v = src[i] & 0xFF;
String hv = Integer.toHexString(v... | // 2. 限制路径深度
int depth = normalized.split("/").length;
if (depth > 5) {
throw new JeecgBootException("上传业务路径深度超出限制!");
}
// 3. 限制字符集(只允许字母、数字、下划线、横线、斜杠)
if (!normalized.matches("^[a-zA-Z0-9/_-]+$")) {
throw new JeecgBootException("上传业务路径包含非法字符!");
... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\filter\SsrfFileTypeFilter.java | 1 |
请完成以下Java代码 | public void put(String propertyName, Integer value) {
jsonNode.put(propertyName, value);
}
@Override
public void put(String propertyName, Long value) {
jsonNode.put(propertyName, value);
}
@Override
public void put(String propertyName, Double value) {
jsonNode.put(prope... | }
@Override
public void putNull(String propertyName) {
jsonNode.putNull(propertyName);
}
@Override
public FlowableArrayNode putArray(String propertyName) {
return new FlowableJackson2ArrayNode(jsonNode.putArray(propertyName));
}
@Override
public void set(String propert... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\json\jackson2\FlowableJackson2ObjectNode.java | 1 |
请完成以下Java代码 | public boolean isProcessing()
{
return get_ValueAsBoolean(COLUMNNAME_Processing);
}
@Override
public org.compiere.model.I_S_TimeExpenseLine getS_TimeExpenseLine()
{
return get_ValueAsPO(COLUMNNAME_S_TimeExpenseLine_ID, org.compiere.model.I_S_TimeExpenseLine.class);
}
@Override
public void setS_TimeExpens... | @Override
public void setS_TimeExpenseLine_ID (final int S_TimeExpenseLine_ID)
{
if (S_TimeExpenseLine_ID < 1)
set_Value (COLUMNNAME_S_TimeExpenseLine_ID, null);
else
set_Value (COLUMNNAME_S_TimeExpenseLine_ID, S_TimeExpenseLine_ID);
}
@Override
public int getS_TimeExpenseLine_ID()
{
return get_Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ProjectIssue.java | 1 |
请完成以下Java代码 | public String[] getCc() {
return Arrays.copyOf(cc, cc.length);
}
public void setCc(String[] cc) {
this.cc = Arrays.copyOf(cc, cc.length);
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTemplate() {
return template;
}
public voi... | this.template = template;
}
@Nullable
public String getBaseUrl() {
return baseUrl;
}
public void setBaseUrl(@Nullable String baseUrl) {
this.baseUrl = baseUrl;
}
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}
public void setAdditionalProperties(Map<String, Objec... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\MailNotifier.java | 1 |
请完成以下Java代码 | public boolean hasVariable(String variableName) {
return variables.containsKey(variableName);
}
@Override
public Object getVariable(String variableName) {
return variables.get(variableName);
}
@Override
public void setVariable(String variableName, Object variableValue) {
... | @Override
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
public Set<String> getVariableNames() {
return variables.keySet();
}
@Override
public String toString() {
ret... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\VariableContainerWrapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PostSaleAuthenticationProgram status(String status)
{
this.status = status;
return this;
}
/**
* The value in this field indicates whether the order line item has passed or failed the authenticity verification inspection, or if the inspection and/or results are still pending. The possible values retur... | public int hashCode()
{
return Objects.hash(outcomeReason, status);
}
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class PostSaleAuthenticationProgram {\n");
sb.append(" outcomeReason: ").append(toIndentedString(outcomeReason)).append("\n");
sb.append(" s... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\PostSaleAuthenticationProgram.java | 2 |
请完成以下Java代码 | protected TbFetchDeviceCredentialsNodeConfiguration loadNodeConfiguration(TbNodeConfiguration configuration) throws TbNodeException {
return TbNodeUtils.convert(configuration, TbFetchDeviceCredentialsNodeConfiguration.class);
}
@Override
public void onMsg(TbContext ctx, TbMsg msg) throws ExecutionE... | TbMsg transformedMsg = transformMessage(msg, msgDataAsObjectNode, metaData);
ctx.tellSuccess(transformedMsg);
}
@Override
public TbPair<Boolean, JsonNode> upgrade(int fromVersion, JsonNode oldConfiguration) throws TbNodeException {
return fromVersion == 0 ?
upgradeRuleNodesW... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\metadata\TbFetchDeviceCredentialsNode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Principal
{
public static final Principal userId(@NonNull final UserId userId)
{
return builder().userId(userId).build();
}
public static final Principal userGroupId(@NonNull final UserGroupId userGroupId)
{
return builder().userGroupId(userGroupId).build();
}
@JsonProperty("userId")
@JsonInc... | private Principal(
@JsonProperty("userId") final UserId userId,
@JsonProperty("userGroupId") final UserGroupId userGroupId)
{
if (userId != null)
{
Check.assume(userGroupId == null, "Setting both {} and {} not allowed", userId, userGroupId);
this.userId = userId;
this.userGroupId = null;
}
else ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\Principal.java | 2 |
请完成以下Java代码 | public TenantQuery createTenantQuery(CommandContext commandContext) {
return new DbTenantQueryImpl();
}
public long findTenantCountByQueryCriteria(DbTenantQueryImpl query) {
configureQuery(query, Resources.TENANT);
return (Long) getDbEntityManager().selectOne("selectTenantCountByQueryCriteria", query);... | return ((Long) getDbEntityManager().selectOne("selectTenantMembershipCount", key)) > 0;
}
//authorizations ////////////////////////////////////////////////////
@Override
protected void configureQuery(@SuppressWarnings("rawtypes") AbstractQuery query, Resource resource) {
Context.getCommandContext()
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\db\DbReadOnlyIdentityServiceProvider.java | 1 |
请完成以下Java代码 | private void deleteFactAcct(final List<MatchInv> matchInvs)
{
for (final MatchInv matchInv : matchInvs)
{
if (matchInv.isPosted())
{
MPeriod.testPeriodOpen(Env.getCtx(), Timestamp.from(matchInv.getDateAcct()), DocBaseType.MatchInvoice, matchInv.getOrgId().getRepoId());
factAcctDAO.deleteForRecordRef(... | for (final MatchInv matchInv : matchInvs)
{
// Reposting is required if a M_MatchInv was created for a purchase invoice.
// ... because we book the matched quantity on InventoryClearing and on Expense the not matched quantity
if (matchInv.getSoTrx().isPurchase())
{
costDetailService.voidAndDeleteForDo... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\interceptor\AcctMatchInvListener.java | 1 |
请完成以下Java代码 | public static void setMigrationScriptDirectory(@NonNull final Path path)
{
_migrationScriptsDirectory = path;
logger.info("Set migration scripts directory: {}", path);
}
/**
* Appends given SQL statement.
* <p>
* If this method is called within a database transaction then the SQL statement will not be wri... | final Path path = getCreateFilePath();
FileUtil.writeString(path, sqlStatements, CHARSET, StandardOpenOption.CREATE, StandardOpenOption.APPEND);
}
catch (final IOException ex)
{
logger.error("Failed writing to {}:\n {}", this, sqlStatements, ex);
close(); // better to close the file ... so, next time a n... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\logger\MigrationScriptFileLogger.java | 1 |
请完成以下Java代码 | public class Article {
@BsonId
public ObjectId id;
public String author;
public String title;
public String description;
// getters and setters
public ObjectId getId() {
return id;
}
public void setId(ObjectId id) {
this.id = id;
}
public String getAutho... | }
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
} | repos\tutorials-master\quarkus-modules\mongo-db\src\main\java\com\baeldung\mongoclient\Article.java | 1 |
请完成以下Java代码 | public boolean isPerfMonActive()
{
return getSysConfigBooleanValue(PM_SYSCONFIG_NAME, PM_SYS_CONFIG_DEFAULT_VALUE);
}
public void performanceMonitoringServiceSaveEx(@NonNull final Runnable runnable)
{
final PerformanceMonitoringService performanceMonitoringService = performanceMonitoringService();
performan... | }
public boolean isChangeLogEnabled()
{
return sessionBL().isChangeLogEnabled();
}
public String getInsertChangeLogType(final int adClientId)
{
return sysConfigBL().getValue("SYSTEM_INSERT_CHANGELOG", "N", adClientId);
}
public void saveChangeLogs(final List<ChangeLogRecord> changeLogRecords)
{
session... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\POServicesFacade.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ClientProperties {
/**
* The admin server urls to register at
*/
private String[] url = new String[] {};
/**
* The admin rest-apis path.
*/
private String apiPath = "instances";
/**
* Time interval the registration is repeated
*/
@DurationUnit(ChronoUnit.MILLIS)
private Duration perio... | * Enable automatic deregistration on shutdown If not set it defaults to true if an
* active {@link CloudPlatform} is present;
*/
@Nullable
private Boolean autoDeregistration = null;
/**
* Enable automatic registration when the application is ready.
*/
private boolean autoRegistration = true;
/**
* Enab... | repos\spring-boot-admin-master\spring-boot-admin-client\src\main\java\de\codecentric\boot\admin\client\config\ClientProperties.java | 2 |
请完成以下Java代码 | public class MInvoiceBatch extends X_C_InvoiceBatch
{
/**
*
*/
private static final long serialVersionUID = 3449653049236263604L;
/**
* Standard Constructor
* @param ctx context
* @param C_InvoiceBatch_ID id
* @param trxName trx
*/
public MInvoiceBatch (Properties ctx, int C_InvoiceBatch_ID, Stri... | }
rs.close ();
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
log.error(sql, e);
}
try
{
if (pstmt != null)
pstmt.close ();
pstmt = null;
}
catch (Exception e)
{
pstmt = null;
}
//
m_lines = new MInvoiceBatchLine[list.size ()];
list.toArray (m_lines);
return m... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MInvoiceBatch.java | 1 |
请完成以下Java代码 | public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.START_EVENT.equals(event.getType())) {
// the Apache Tomcat integration uses the Jmx Container for managing process engines and applications.
containerDelegate = (RuntimeContainerDelegateImpl) RuntimeContainerDelegate.INSTANCE.get();
... | }
protected void undeployBpmPlatform(LifecycleEvent event) {
final StandardServer server = (StandardServer) event.getSource();
containerDelegate.getServiceContainer().createUndeploymentOperation("undeploy BPM platform")
.addAttachment(TomcatAttachments.SERVER, server)
.addStep(new StopJobExecu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\tomcat\TomcatBpmPlatformBootstrap.java | 1 |
请完成以下Java代码 | private String getServiceUrl(@Nullable String serviceUrl, Map<String, String> metadata) {
if (serviceUrl == null) {
return null;
}
String url = metadata.getOrDefault("service-url", serviceUrl);
try {
URI baseUri = new URI(url);
return baseUri.toString();
}
catch (URISyntaxException ex) {
log.wa... | * @return true, if valid.
*/
private boolean checkUrl(String url) {
try {
URI uri = new URI(url);
return uri.isAbsolute();
}
catch (URISyntaxException ex) {
return false;
}
}
public static class Builder {
// Will be generated by lombok
}
} | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\domain\values\Registration.java | 1 |
请完成以下Java代码 | protected void initializeOnPart(CaseFileItemOnPart onPart, Sentry sentry, CmmnHandlerContext context) {
// not yet implemented
String id = sentry.getId();
LOG.ignoredUnsupportedAttribute("onPart", "CaseFileItem", id);
}
protected void initializeIfPart(IfPart ifPart, CmmnSentryDeclaration sentryDeclarat... | if (variableName != null) {
if (!sentryDeclaration.hasVariableOnPart(variableEventName, variableName)) {
CmmnVariableOnPartDeclaration variableOnPartDeclaration = new CmmnVariableOnPartDeclaration();
variableOnPartDeclaration.setVariableEvent(variableEventName);
variableOnPartDeclaration.s... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\handler\SentryHandler.java | 1 |
请完成以下Java代码 | public Token createNewToken(String tokenId) {
TokenEntity tokenEntity = create();
tokenEntity.setId(tokenId);
tokenEntity.setRevision(0); // needed as tokens can be transient
return tokenEntity;
}
@Override
public void updateToken(Token updatedToken) {
super.update((... | public long findTokenCountByQueryCriteria(TokenQueryImpl query) {
return dataManager.findTokenCountByQueryCriteria(query);
}
@Override
public TokenQuery createNewTokenQuery() {
return new TokenQueryImpl(getCommandExecutor());
}
@Override
public List<Token> findTokensByNativeQue... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\TokenEntityManagerImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}
public static class Packages {
/**
* Whether to trust all packages.
*/
private @Nullable Boolean trustAll;
/**
* List of specific packages to trust (when not trusti... | private List<String> trusted = new ArrayList<>();
public @Nullable Boolean getTrustAll() {
return this.trustAll;
}
public void setTrustAll(@Nullable Boolean trustAll) {
this.trustAll = trustAll;
}
public List<String> getTrusted() {
return this.trusted;
}
public void setTrusted(List<String> tr... | repos\spring-boot-4.0.1\module\spring-boot-activemq\src\main\java\org\springframework\boot\activemq\autoconfigure\ActiveMQProperties.java | 2 |
请完成以下Java代码 | public boolean isRequisition(final DocTypeId docTypeId)
{
final I_C_DocType dt = docTypesRepo.getById(docTypeId);
return X_C_DocType.DOCSUBTYPE_Requisition.equals(dt.getDocSubType())
&& X_C_DocType.DOCBASETYPE_PurchaseOrder.equals(dt.getDocBaseType());
}
@Override
public boolean isMediated(@NonNull final D... | @NonNull
public ImmutableList<I_C_DocType> retrieveForSelection(@NonNull final PInstanceId pinstanceId)
{
return docTypesRepo.retrieveForSelection(pinstanceId);
}
public DocTypeId cloneToOrg(@NonNull final I_C_DocType fromDocType, @NonNull final OrgId toOrgId)
{
final String newName = fromDocType.getName() + ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\impl\DocTypeBL.java | 1 |
请完成以下Java代码 | public ListenerContainerFactoryResolver.Configuration forContainerFactoryResolver() {
return this.factoryResolverConfig;
}
public @Nullable EndpointHandlerMethod getDltHandlerMethod() {
return this.dltHandlerMethod;
}
public List<DestinationTopic.Properties> getDestinationTopicProperties() {
return this.des... | this.numPartitions = 1;
this.replicationFactor = -1;
}
TopicCreation(boolean shouldCreateTopics) {
this.shouldCreateTopics = shouldCreateTopics;
this.numPartitions = 1;
this.replicationFactor = -1;
}
public int getNumPartitions() {
return this.numPartitions;
}
public short getReplicationFa... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\RetryTopicConfiguration.java | 1 |
请完成以下Java代码 | public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
} | public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
public List<String> getPhones() {
return phones;
}
public void setPhones(List<String> phones) {
this.phones = phones;
}
} | repos\tutorials-master\json-modules\json-3\src\main\java\com\baeldung\pojomapping\User.java | 1 |
请完成以下Java代码 | public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
User user = (User) o;
return Objects.equals(this.id, user.id) &&
Objects.equals(this.username, user.username) &&
Objects.equals(t... | sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
... | repos\tutorials-master\spring-swagger-codegen-modules\spring-openapi-generator-api-client\src\main\java\com\baeldung\petstore\client\model\User.java | 1 |
请完成以下Java代码 | public class LoadBankStatement extends JavaProcess
{
public LoadBankStatement()
{
super();
log.info("LoadBankStatement");
} // LoadBankStatement
/** Client to be imported to */
private int m_AD_Client_ID = 0;
/** Organization to be imported to */
private int m_AD_Org_ID = 0;
/** Ban Statement ... | log.error("Unknown Parameter: " + name);
}
m_AD_Client_ID = Env.getAD_Client_ID(m_ctx);
log.info("AD_Client_ID=" + m_AD_Client_ID);
m_AD_Org_ID = Env.getAD_Org_ID(m_ctx);
log.info("AD_Org_ID=" + m_AD_Org_ID);
log.info("C_BankStatementLoader_ID=" + m_C_BankStmtLoader_ID);
} // prepare
/**
* Perform pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-legacy\org\compiere\process\LoadBankStatement.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.