instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public JobEntity findJobByCorrelationId(String correlationId) {
return dataManager.findJobByCorrelationId(correlationId);
}
@Override
public List<Job> findJobsByQueryCriteria(JobQueryImpl jobQuery) {
return dataManager.findJobsByQueryCriteria(jobQuery);
}
@Override
public long ... | @Override
public void delete(JobEntity entity, boolean fireDeleteEvent) {
if (serviceConfiguration.getInternalJobManager() != null) {
serviceConfiguration.getInternalJobManager().handleJobDelete(entity);
}
super.delete(entity, fireDeleteEvent);
}
@Override
p... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\JobEntityManagerImpl.java | 2 |
请完成以下Java代码 | public void deleteHistoricProcessInstance(String processInstanceId) {
commandExecutor.execute(new DeleteHistoricProcessInstanceCmd(processInstanceId));
}
public NativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery() {
return new NativeHistoricProcessInstanceQueryImpl(comm... | @Override
public List<HistoricIdentityLink> getHistoricIdentityLinksForProcessInstance(String processInstanceId) {
return commandExecutor.execute(new GetHistoricIdentityLinksForTaskCmd(null, processInstanceId));
}
@Override
public List<HistoricIdentityLink> getHistoricIdentityLinksForTask(Strin... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoryServiceImpl.java | 1 |
请完成以下Java代码 | public int getM_Inventory_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Inventory_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Securpharm Aktion Ergebnise.
@param M_Securpharm_Action_Result_ID Securpharm Aktion Ergebnise */
@Override
public void setM_Securpharm_Action_Resul... | }
/** Get Securpharm Produktdaten Ergebnise.
@return Securpharm Produktdaten Ergebnise */
@Override
public int getM_Securpharm_Productdata_Result_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Securpharm_Productdata_Result_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Trans... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java-gen\de\metas\vertical\pharma\securpharm\model\X_M_Securpharm_Action_Result.java | 1 |
请完成以下Java代码 | public void visit(ScopeImpl obj) {
PvmExecutionImpl execution = scopeExecutionMapping.get(obj);
subscriptions.addAll(((ExecutionEntity) execution).getCompensateEventSubscriptions());
}
};
new FlowScopeWalker(activity).addPostVisitor(eventSubscriptionCollector).walkUntil(new ReferenceWalke... | }
private static String getSubscriptionActivityId(ActivityExecution execution, String activityRef) {
ActivityImpl activityToCompensate = ((ExecutionEntity) execution).getProcessDefinition().findActivity(activityRef);
if (activityToCompensate.isMultiInstance()) {
ActivityImpl flowScope = (ActivityImpl... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\helper\CompensationUtil.java | 1 |
请完成以下Java代码 | public void handleGetByParam(InputStream inputStream, OutputStream outputStream, Context context) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
JSONObject responseJson = new JSONObject();
AmazonDynamoDB client = AmazonDynamoDBClientBuilder... | Person person = new Person(result.toJSON());
responseBody.put("Person", person);
responseJson.put("statusCode", 200);
} else {
responseBody.put("message", "No item found");
responseJson.put("statusCode", 404);
}
JSONOb... | repos\tutorials-master\aws-modules\aws-lambda-modules\lambda-function\src\main\java\com\baeldung\lambda\apigateway\APIDemoHandler.java | 1 |
请完成以下Java代码 | public static final class Builder {
private String id;
private String eventName;
private String processDefinitionId;
private String configuration;
private String activityId;
private Date created;
public Builder() {}
private Builder(StartMessageSubscript... | /**
* Builder method for configuration parameter.
* @param configuration field to set
* @return builder
*/
public Builder withConfiguration(String configuration) {
this.configuration = configuration;
return this;
}
/**
* Build... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\StartMessageSubscriptionImpl.java | 1 |
请完成以下Java代码 | public class CacheSourceModelFactory
{
public static ICacheSourceModel ofPO(@NonNull final PO po)
{
return new POCacheSourceModel(po);
}
public static ICacheSourceModel ofObject(@NonNull final Object obj)
{
final PO po = unwrapPOOrNull(obj);
if (po != null)
{
return ofPO((PO)obj);
}
else
{ | return new ModelCacheSourceModel(obj);
}
}
@Nullable
private static PO unwrapPOOrNull(@NonNull final Object obj)
{
if (obj instanceof PO)
{
return (PO)obj;
}
return POWrapper.getStrictPO(obj);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\CacheSourceModelFactory.java | 1 |
请完成以下Java代码 | public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.author = author;
}
public Publisher getPublisher() {
return publisher;
}
public void setPublisher(Publisher publisher) {
this.publisher = publisher;
}
@Ove... | }
if (getClass() != obj.getClass()) {
return false;
}
return id != null && id.equals(((Book) obj).id);
}
@Override
public int hashCode() {
return 2021;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", ... | repos\Hibernate-SpringBoot-master\HibernateSpringBootNamedSubgraph\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public static VersionReference ofValue(String value) {
return new VersionReference(null, value);
}
/**
* Specify if this reference defines a property.
* @return {@code true} if this version is backed by a property
*/
public boolean isProperty() {
return this.property != null;
}
/**
* Return the {@lin... | @Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
VersionReference that = (VersionReference) o;
return Objects.equals(this.property, that.property) && Objects.equals(this.value, that.value);
}
@Override
publi... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\version\VersionReference.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<Message> list() {
List<Message> messages = this.messageRepository.findAll();
return messages;
}
@ApiOperation(
value = "添加消息",
notes = "根据参数创建消息"
)
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "消息 ID", required = true, dataType = "Long", paramType = "query"),
@ApiImplicit... | Message messageResult=this.messageRepository.update(message);
return messageResult;
}
@PatchMapping(value="/message/text")
public BaseResult<Message> patch(Message message) {
Message messageResult=this.messageRepository.updateText(message);
return BaseResult.successWithData(messageResult);
}
@GetMapping(va... | repos\spring-boot-leaning-master\2.x_42_courses\第 2-9 课:Spring Boot 中使用 Swagger2 构建 RESTful APIs\spring-boot-swagger\src\main\java\com\neo\controller\MessageController.java | 2 |
请完成以下Java代码 | private boolean isStatsPrintRequired() {
return log.isInfoEnabled();
}
private List<GroupTopicStats> getTopicsStatsWithLag(Map<TopicPartition, OffsetAndMetadata> groupOffsets, Map<TopicPartition, Long> endOffsets) {
List<GroupTopicStats> consumerGroupStats = new ArrayList<>();
for (Topi... | @Builder
@Data
private static class GroupTopicStats {
private String topic;
private int partition;
private long committedOffset;
private long endOffset;
private long lag;
@Override
public String toString() {
return "[" +
"to... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\kafka\TbKafkaConsumerStatsService.java | 1 |
请完成以下Java代码 | public class GenericMapOutputConverter<V> implements StructuredOutputConverter<Map<String, V>> {
private final ObjectMapper objectMapper;
private final String jsonSchema;
private final TypeReference<Map<String, V>> typeRef;
public GenericMapOutputConverter(Class<V> valueType) {
this.objectMapp... | }
private String trimMarkdown(String text) {
if (text.startsWith("```json") && text.endsWith("```")) {
text = text.substring(7, text.length() - 3);
}
return text;
}
private String generateJsonSchemaForValueType(Class<V> valueType) {
try {
JacksonModu... | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springaistructuredoutput\converters\GenericMapOutputConverter.java | 1 |
请完成以下Java代码 | public void setRltdAcct(CashAccount24 value) {
this.rltdAcct = value;
}
/**
* Gets the value of the intrst property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be p... | * getNtry().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReportEntry8 }
*
*
*/
public List<ReportEntry8> getNtry() {
if (ntry == null) {
ntry = new ArrayList<ReportEntry8>();
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\AccountNotification12.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getInputVariable() {
return inputVariable;
}
public void setInputVariable(String ... | if (id != null ? !id.equals(that.id) : that.id != null) return false;
if (name != null ? !name.equals(that.name) : that.name != null) return false;
if (inputVariable != null ? !inputVariable.equals(that.inputVariable) : that.inputVariable != null) return false;
return !(value != null ? !value.equals(that.va... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\delegate\DmnEvaluatedInputImpl.java | 1 |
请完成以下Java代码 | public CleanableHistoricCaseInstanceReport compact() {
this.isCompact = true;
return this;
}
@Override
public CleanableHistoricCaseInstanceReport orderByFinished() {
orderBy(CleanableHistoricInstanceReportProperty.FINISHED_AMOUNT);
return this;
}
@Override
public long executeCount(CommandC... | public String[] getCaseDefinitionKeyIn() {
return caseDefinitionKeyIn;
}
public void setCaseDefinitionKeyIn(String[] caseDefinitionKeyIn) {
this.caseDefinitionKeyIn = caseDefinitionKeyIn;
}
public Date getCurrentTimestamp() {
return currentTimestamp;
}
public void setCurrentTimestamp(Date cur... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\CleanableHistoricCaseInstanceReportImpl.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_M_Warehouse getM_Warehouse() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Warehouse_ID, org.compiere.model.I_M_Warehouse.class);
}
@Override
public void setM_Warehouse(org.compiere.model.I_M_Warehouse M_Warehouse)
{
set_ValueFromPO(COLUMNNAME_M_Warehouse_ID, org.comp... | return 0;
return ii.intValue();
}
/** Set Lagerzuordnung.
@param M_Warehouse_Routing_ID Lagerzuordnung */
@Override
public void setM_Warehouse_Routing_ID (int M_Warehouse_Routing_ID)
{
if (M_Warehouse_Routing_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Warehouse_Routing_ID, null);
else
set_ValueNoChe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_M_Warehouse_Routing.java | 1 |
请完成以下Java代码 | public Set<OrderDetail> lazyLoaded() {
final Session sessionLazy = HibernateUtil.getHibernateSession("lazy");
List<UserLazy> users = sessionLazy.createQuery("From UserLazy").list();
UserLazy userLazyLoaded = users.get(0);
// since data is lazyloaded so data won't be initialized
r... | session.save(user1);
session.save(user2);
session.save(user3);
final OrderDetail order1 = new OrderDetail();
final OrderDetail order2 = new OrderDetail();
final OrderDetail order3 = new OrderDetail();
final OrderDetail order4 = new OrderDetail();
final OrderDetai... | repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\hibernate\fetching\view\FetchingAppView.java | 1 |
请完成以下Java代码 | public class CamundaBpmRunLdapProperties extends LdapIdentityProviderPlugin {
public static final String PREFIX = CamundaBpmRunProperties.PREFIX + ".ldap";
boolean enabled = true;
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
... | ", userSearchFilter=" + userSearchFilter +
", groupSearchBase=" + groupSearchBase +
", groupSearchFilter=" + groupSearchFilter +
", userIdAttribute=" + userIdAttribute +
", userFirstnameAttribute=" + userFirstnameAttribute +
", userLastnameAttribute=" + userLastnameAttribute +
... | repos\camunda-bpm-platform-master\distro\run\core\src\main\java\org\camunda\bpm\run\property\CamundaBpmRunLdapProperties.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Employee {
@EmbeddedId
private EmployeeIdentity id;
private String name;
private String email;
@Column(name = "phone_number")
private String phoneNumber;
public Employee() {
}
public Employee(EmployeeIdentity id, String name, String email, String phoneNumber) {
super();
this.id = id... | public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
} | repos\Spring-Boot-Advanced-Projects-main\springboot-hibernate-composite-key-demo\src\main\java\net\alanbinu\springboot\entity\Employee.java | 2 |
请完成以下Java代码 | private void releaseAndSave(final I_M_PickingSlot pickingSlot)
{
pickingSlot.setC_BPartner_ID(-1);
pickingSlot.setC_BPartner_Location_ID(-1);
pickingSlot.setM_Picking_Job_ID(-1);
pickingSlotDAO.save(pickingSlot);
}
@Override
public void releasePickingSlotIfPossible(final PickingSlotId pickingSlotId)
{
f... | @Override
public ImmutableList<HuId> retrieveAvailableHUIdsToPickForShipmentSchedule(@NonNull final RetrieveAvailableHUIdsToPickRequest request)
{
final I_M_ShipmentSchedule schedule = loadOutOfTrx(request.getScheduleId(), I_M_ShipmentSchedule.class);
final PickingHUsQuery query = PickingHUsQuery
.builder()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\impl\HUPickingSlotBL.java | 1 |
请完成以下Java代码 | public boolean apply(IInvoiceCandidateRow row)
{
return row.isSelected();
}
};
public InvoiceCandidatesTableModel()
{
super(IInvoiceCandidateRow.class);
}
public final List<IInvoiceCandidateRow> getRowsSelected()
{
return FluentIterable.from(getRowsInnerList())
.filter(PREDICATE_Selected)
.to... | }
/** @return latest {@link IInvoiceCandidateRow#getDocumentDate()} of selected rows */
public final Date getLatestDocumentDateOfSelectedRows()
{
Date latestDocumentDate = null;
for (final IInvoiceCandidateRow row : getRowsSelected())
{
final Date documentDate = row.getDocumentDate();
latestDocumentDat... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\InvoiceCandidatesTableModel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ConfigurableBootstrapContext getBootstrapContext() {
return this.contributors.getBootstrapContext();
}
}
private class InactiveSourceChecker implements BindHandler {
private final @Nullable ConfigDataActivationContext activationContext;
InactiveSourceChecker(@Nullable ConfigDataActivationContext a... | }
/**
* Binder options that can be used with
* {@link ConfigDataEnvironmentContributors#getBinder(ConfigDataActivationContext, BinderOption...)}.
*/
enum BinderOption {
/**
* Throw an exception if an inactive contributor contains a bound value.
*/
FAIL_ON_BIND_TO_INACTIVE_SOURCE
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataEnvironmentContributors.java | 2 |
请完成以下Java代码 | public String getEntityType ()
{
return (String)get_Value(COLUMNNAME_EntityType);
}
/** ReplicationType AD_Reference_ID=126 */
public static final int REPLICATIONTYPE_AD_Reference_ID=126;
/** Local = L */
public static final String REPLICATIONTYPE_Local = "L";
/** Merge = M */
public static final String REP... | {
return (String)get_Value(COLUMNNAME_ReplicationType);
}
public I_EXP_Format getEXP_Format() throws RuntimeException
{
return (I_EXP_Format)MTable.get(getCtx(), I_EXP_Format.Table_Name)
.getPO(getEXP_Format_ID(), get_TrxName());
}
public void setEXP_Format_ID (int EXP_Format_ID)
{
if (EXP_Format_ID ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationTable.java | 1 |
请完成以下Java代码 | public String getTitle() {
return title;
}
public Book setTitle(String title) {
this.title = title;
return this;
}
public String getAuthor() {
return author;
}
public Book setAuthor(String author) {
this.author = author;
return this;
}
... | if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Book other = (Book) obj;
if (author == null) {
if (other.author != null)
return false;
} else if (!author.e... | repos\tutorials-master\persistence-modules\java-mongodb\src\main\java\com\baeldung\bsontojson\Book.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OAuthFeignConfig {
public static final String CLIENT_REGISTRATION_ID = "keycloak";
private final OAuth2AuthorizedClientService oAuth2AuthorizedClientService;
private final ClientRegistrationRepository clientRegistrationRepository;
public OAuthFeignConfig(OAuth2AuthorizedClientService oAu... | }
@Bean
OAuth2AuthorizedClientManager authorizedClientManager() {
OAuth2AuthorizedClientProvider authorizedClientProvider = OAuth2AuthorizedClientProviderBuilder.builder()
.clientCredentials()
.build();
AuthorizedClientServiceOAuth2AuthorizedClientManager authorizedClie... | repos\tutorials-master\spring-cloud-modules\spring-cloud-openfeign\src\main\java\com\baeldung\cloud\openfeign\oauthfeign\OAuthFeignConfig.java | 2 |
请完成以下Java代码 | abstract class StdConverters {
static final class AccessTokenTypeConverter extends StdConverter<JsonNode, OAuth2AccessToken.TokenType> {
@Override
public OAuth2AccessToken.TokenType convert(JsonNode jsonNode) {
String value = JsonNodeUtils.findStringValue(jsonNode, "value");
if (OAuth2AccessToken.TokenType... | }
if (AuthorizationGrantType.CLIENT_CREDENTIALS.getValue().equalsIgnoreCase(value)) {
return AuthorizationGrantType.CLIENT_CREDENTIALS;
}
return new AuthorizationGrantType(value);
}
}
static final class AuthenticationMethodConverter extends StdConverter<JsonNode, AuthenticationMethod> {
@Override
... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\jackson\StdConverters.java | 1 |
请完成以下Java代码 | public boolean supportsParameter(MethodParameter parameter) {
return findMethodAnnotation(parameter) != null;
}
/**
* Sets the {@link BeanResolver} to be used on the expressions
* @param beanResolver the {@link BeanResolver} to use
*/
public void setBeanResolver(BeanResolver beanResolver) {
this.beanResol... | this.useAnnotationTemplate = templateDefaults != null;
}
/**
* Obtains the specified {@link Annotation} on the specified {@link MethodParameter}.
* {@link MethodParameter}
* @param parameter the {@link MethodParameter} to search for an {@link Annotation}
* @return the {@link Annotation} that was found or nul... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\method\annotation\AuthenticationPrincipalArgumentResolver.java | 1 |
请完成以下Java代码 | public void setProductNo(final String productNo)
{
this.productNo = productNo;
productNoSet = true;
}
public void setDescription(final String description)
{
this.description = description;
descriptionSet = true;
}
public void setCuEAN(final String cuEAN)
{
this.cuEAN = cuEAN;
cuEANSet = true;
}... | }
public void setExcludedFromSales(final Boolean excludedFromSales)
{
this.excludedFromSales = excludedFromSales;
excludedFromSalesSet = true;
}
public void setExclusionFromSalesReason(final String exclusionFromSalesReason)
{
this.exclusionFromSalesReason = exclusionFromSalesReason;
exclusionFromSalesRe... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestBPartnerProductUpsert.java | 1 |
请完成以下Java代码 | public ImmutableList<ProductPrice> getProductPrices(@NonNull final PriceListVersionId priceListVersionId)
{
return priceListsRepo.retrieveProductPrices(priceListVersionId)
.map(productPriceRepository::toProductPrice)
.collect(ImmutableList.toImmutableList());
}
@NonNull
public ImmutableList<I_M_ProductPr... | if (Type.METASFRESH_ID.equals(type))
{
return builder
.bPartnerId(bpartnerIdentifier.asMetasfreshId(BPartnerId::ofRepoId))
.build();
}
else if (Type.EXTERNAL_ID.equals(type))
{
return builder
.externalId(bpartnerIdentifier.asExternalId())
.build();
}
else if (Type.VALUE.equals(type... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\bpartner_pricelist\BpartnerPriceListServicesFacade.java | 1 |
请完成以下Java代码 | public class PersonName {
public String getName(String firstName, String lastName) throws RuntimeException {
return firstName + " " + lastName;
}
public String getName(String firstName, String middleName, String lastName) {
if (!middleName.equals("")) {
return firstName + " " +... | }
public void writeName(String name) throws IOException {
PrintWriter out = new PrintWriter(new FileWriter("OutFile.txt"));
out.println("Name: " + name);
out.close();
}
public static String getNameStatic(String firstName, String lastName) {
return firstName + " " + lastName... | repos\tutorials-master\core-java-modules\core-java-lang-oop-methods-2\src\main\java\com\baeldung\methods\PersonName.java | 1 |
请完成以下Java代码 | public long length() {
return this.delegate.length();
}
@Override
public URI getURI() {
return this.delegate.getURI();
}
@Override
public String getName() {
return this.delegate.getName();
}
@Override
public String getFileName() {
return this.delegate.getFileName();
}
@Override
public InputStrea... | @Override
public boolean isAlias() {
return this.delegate.isAlias();
}
@Override
public URI getRealURI() {
return this.delegate.getRealURI();
}
@Override
public void copyTo(Path destination) throws IOException {
this.delegate.copyTo(destination);
}
@Override
public Collection<Resource> getAllResource... | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\servlet\LoaderHidingResource.java | 1 |
请完成以下Java代码 | public class ToCleanString implements Operator<String, String> {
public static ToCleanString toCleanString() {
return new ToCleanString();
}
private ToCleanString() {
super();
}
@Override
public Subscriber<? super String> call(final Subscriber<? super String> subscriber) {
... | @Override
public void onError(Throwable t) {
if (!subscriber.isUnsubscribed()) {
subscriber.onError(t);
}
}
@Override
public void onNext(String item) {
if (!subscriber.isUnsubscribed()) {
... | repos\tutorials-master\rxjava-modules\rxjava-operators\src\main\java\com\baeldung\rxjava\operator\ToCleanString.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_OrgAssignment[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_AD_User getAD_User() throws RuntimeException
{
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
.getPO(getAD_User_ID(), ... | @param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
/** Get Valid from.
@return Valid from including this date (first day)
*/
public Timestamp getValidFrom ()
{
return (Timestamp)get_Value(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrgAssignment.java | 1 |
请完成以下Java代码 | public void setDescription(String description) {
this.description = description;
}
@Override
public String getApplicationName() {
return this.applicationName;
}
/**
* Sets the application name.
* @param applicationName the application name
*/
public void setApplicationName(String applicationName) {
... | }
/**
* Sets the package name.
* @param packageName the package name
*/
public void setPackageName(String packageName) {
this.packageName = packageName;
}
@Override
public String getBaseDirectory() {
return this.baseDirectory;
}
/**
* Sets the base directory.
* @param baseDirectory the base dire... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\project\MutableProjectDescription.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ForecastService
{
private final static AdMessageKey FORECAST_COMPLETED_NOTIFICATION = AdMessageKey.of("ForecastDocumentCompleted");
@NonNull private final IForecastDAO forecastDAO = Services.get(IForecastDAO.class);
@NonNull private final IDocumentBL docActionBL = Services.get(IDocumentBL.class);
@Non... | sendForecastCompleteNotification(forecast, userId);
});
}
private void complete(@NonNull final I_M_Forecast forecast)
{
docActionBL.processEx(forecast, IDocument.ACTION_Complete, IDocument.STATUS_Completed);
}
private void sendForecastCompleteNotification(@NonNull final I_M_Forecast forecast, @NonNull final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\mforecast\impl\ForecastService.java | 2 |
请完成以下Java代码 | public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getCredentialType() {
return credentialType;
}
public void setCredentialType(String credentialType) {
this.credentialType = credentialType;
}... | public void setTransports(String transports) {
this.transports = transports;
}
public Boolean getBackupEligible() {
return backupEligible;
}
public void setBackupEligible(Boolean backupEligible) {
this.backupEligible = backupEligible;
}
public Boolean getBackupState() ... | repos\tutorials-master\spring-security-modules\spring-security-passkey\src\main\java\com\baeldung\tutorials\passkey\domain\PasskeyCredential.java | 1 |
请完成以下Java代码 | public class ListDemo {
private List<Passenger> passengers = new ArrayList<>(20);
// private List<Passenger> passengers = new LinkedList<>(); // No compile time error
public List<Passenger> addPassenger(Passenger passenger) {
passengers.add(passenger);
return passengers;
}
publ... | return passengers.stream()
.filter(it -> it.getDestination().equals(destination))
.collect(Collectors.toList());
}
public long getKidsCount(List<Passenger> passengerList) {
return passengerList.stream()
.filter(it -> (it.getAge() <= 10))
.count();
... | repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\list\listvsarraylist\ListDemo.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Produkt.
@return Produkt, Leistung, Artikel
*/
@Override
public int getM_Product_ID ()... | Checkbox sagt aus, ob der Beleg verarbeitet wurde.
*/
@Override
public void setProcessed (boolean Processed)
{
throw new IllegalArgumentException ("Processed is virtual column"); }
/** Get Verarbeitet.
@return Checkbox sagt aus, ob der Beleg verarbeitet wurde.
*/
@Override
public boolean isProcessed ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Cost.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class ServletApiConfigurer<H extends HttpSecurityBuilder<H>>
extends AbstractHttpConfigurer<ServletApiConfigurer<H>, H> {
private SecurityContextHolderAwareRequestFilter securityContextRequestFilter = new SecurityContextHolderAwareRequestFilter();
/**
* Creates a new instance
* @see HttpSecurity#... | List<LogoutHandler> logoutHandlers = (logoutConf != null) ? logoutConf.getLogoutHandlers() : null;
this.securityContextRequestFilter.setLogoutHandlers(logoutHandlers);
AuthenticationTrustResolver trustResolver = http.getSharedObject(AuthenticationTrustResolver.class);
if (trustResolver != null) {
this.security... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\ServletApiConfigurer.java | 2 |
请完成以下Java代码 | public Map<String, Object> getCaseVariables() {
return null;
}
@Override
public List<? extends IdentityLinkInfo> getIdentityLinks() {
return null;
}
@Override
public Date getClaimTime() {
return null;
}
@Override
public void setName(String name) {
a... | activiti5Task.setAssignee(assignee);
}
@Override
public DelegationState getDelegationState() {
return activiti5Task.getDelegationState();
}
@Override
public void setDelegationState(DelegationState delegationState) {
activiti5Task.setDelegationState(delegationState);
}
... | repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5TaskWrapper.java | 1 |
请完成以下Java代码 | public void setA_Term (String A_Term)
{
set_Value (COLUMNNAME_A_Term, A_Term);
}
/** Get Period/Yearly.
@return Period/Yearly */
public String getA_Term ()
{
return (String)get_Value(COLUMNNAME_A_Term);
}
/** Set Description.
@param Description
Optional short description of the record
*/
pub... | }
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Table_Header.java | 1 |
请完成以下Java代码 | public class AggregationKeyRegistry implements IAggregationKeyRegistry
{
private static final Map<String, List<String>> dependsOnColumnNames = new HashMap<>();
private static final Map<String, CompositeAggregationKeyValueHandler> _valueHandlers = new HashMap<>();
@Override
public void registerDependsOnColumnnames... | @Override
public void registerAggregationKeyValueHandler(final String registrationKey, final IAggregationKeyValueHandler<?> aggregationKeyValueHandler)
{
final CompositeAggregationKeyValueHandler compositeKeyValueHandler = getCompositeKeyValueHandler(registrationKey);
@SuppressWarnings("unchecked")
final IAggr... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\agg\key\impl\AggregationKeyRegistry.java | 1 |
请完成以下Java代码 | public String getElementName() {
return ELEMENT_CALL_ACTIVITY_IN_PARAMETERS;
}
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model)
throws Exception {
String source = xtr.getAttributeValue(null, ATTRIBUTE_IOPARAMETER_SOURCE);... | (StringUtils.isNotEmpty(source) || StringUtils.isNotEmpty(sourceExpression)) &&
StringUtils.isNotEmpty(target)
) {
IOParameter parameter = new IOParameter();
if (StringUtils.isNotEmpty(sourceExpression)) {
parameter.setSourceExpression(sour... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\CallActivityXMLConverter.java | 1 |
请完成以下Java代码 | public void init(TbContext tbContext, TbNodeConfiguration configuration) throws TbNodeException {
this.config = TbNodeUtils.convert(configuration, TbCheckMessageNodeConfiguration.class);
messageNamesList = config.getMessageNames();
metadataNamesList = config.getMetadataNames();
}
@Overr... | if (!metadataNamesList.isEmpty()) {
Map<String, String> metadataMap = metadataToMap(msg);
return processAtLeastOne(metadataNamesList, metadataMap);
}
return false;
}
private boolean processAllKeys(List<String> data, Map<String, String> map) {
for (String field : ... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\filter\TbCheckMessageNode.java | 1 |
请完成以下Java代码 | public Collection<HUProcessDescriptor> getHUProcessDescriptors()
{
return getIndexedHUProcessDescriptors().getAsCollection();
}
@Override
public HUProcessDescriptor getByProcessIdOrNull(@NonNull final AdProcessId processId)
{
return getIndexedHUProcessDescriptors().getByProcessIdOrNull(processId);
}
privat... | {
builder.acceptHUUnitType(HuUnitType.TU);
}
if (huProcessRecord.isApplyToCUs())
{
builder.acceptHUUnitType(HuUnitType.VHU);
}
builder.provideAsUserAction(huProcessRecord.isProvideAsUserAction());
builder.acceptOnlyTopLevelHUs(huProcessRecord.isApplyToTopLevelHUsOnly());
return builder.build();
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\process\api\impl\MHUProcessDAO.java | 1 |
请完成以下Java代码 | public static void printJsonString(@NonNull final JsonOLCandCreateBulkRequest object)
{
System.out.println(writeValueAsString(object));
}
private static String writeValueAsString(@NonNull final JsonOLCandCreateBulkRequest object)
{
final ObjectMapper jsonObjectMapper = JsonObjectMapperHolder.newJsonObjectMappe... | {
return fromRessource(resourceName, JsonOLCandCreateRequest.class);
}
private static <T> T fromRessource(@NonNull final String resourceName, @NonNull final Class<T> clazz)
{
final InputStream inputStream = Check.assumeNotNull(
JsonOLCandUtil.class.getResourceAsStream(resourceName),
"There needs to be a... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\ordercandidates\impl\JsonOLCandUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CurrencyId getCurrencyId()
{
return amountToAllocateInitial.getCurrencyId();
}
@Override
public void addAllocatedAmt(@NonNull final Money allocatedAmtToAdd)
{
allocatedAmt = allocatedAmt.add(allocatedAmtToAdd);
amountToAllocate = amountToAllocate.subtract(allocatedAmtToAdd);
}
@Override
public Lo... | public Money calculateProjectedOverUnderAmt(@NonNull final Money amountToAllocate)
{
return getOpenAmtRemaining().subtract(amountToAllocate);
}
@Override
public boolean canPay(@NonNull final PayableDocument payable)
{
return true;
}
@Override
public Money getPaymentDiscountAmt()
{
return amountToAlloca... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\service\PaymentDocument.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Book {
@Id
@GeneratedValue
private Long id;
private String title;
private String author;
public Book(String title, String author) {
this.title = title;
this.author = author;
}
public Book() {
}
public Long getId() {
return id;
}
p... | return author;
}
public void setAuthor(String author) {
this.author = author;
}
static Specification<Book> hasAuthor(String author) {
return (book, cq, cb) -> cb.equal(book.get("author"), author);
}
static Specification<Book> titleContains(String title) {
return (book,... | repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\criteriaquery\Book.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getMessage() {
return message;
}
... | public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getTaskUrl() {
return taskUrl;
}
public void setTaskUrl(String taskUrl) {
this.taskUrl = taskUrl;
}
public String getProcessInstan... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\engine\CommentResponse.java | 2 |
请完成以下Spring Boot application配置 | server.port=8088
spring.datasource.url=jdbc:mysql://localhost:3306/demo
spring.datasource.username=root
spring.datasource.password=root
#Spring Boot 2.0 includes HikariDataSource by default
#spring.datasource.type = com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.connection-timeout=20000
spring.datasourc... | auto-commit=true
spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
#use mysql database
spring.jpa.database=mysql
# show sql
spring.jpa.show-sql=true | repos\springboot-demo-master\hikari\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setPhone(String phone) {
this.phone = phone;
}
public String getMail() {
return mail;
}
public void setMail(String mail) {
this.mail = mail;
}
public String getLicencePic() {
return licencePic;
}
public void setLicencePic(String licencePic)... | public RoleEntity getRoleEntity() {
return roleEntity;
}
public void setRoleEntity(RoleEntity roleEntity) {
this.roleEntity = roleEntity;
}
@Override
public String toString() {
return "UserEntity{" +
"id='" + id + '\'' +
", username='" + us... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\user\UserEntity.java | 2 |
请完成以下Java代码 | public DeviceProfile findDefaultEntityByTenantId(UUID tenantId) {
return findDefaultDeviceProfile(TenantId.fromUUID(tenantId));
}
@Override
public List<DeviceProfileInfo> findByTenantAndImageLink(TenantId tenantId, String imageLink, int limit) {
return deviceProfileRepository.findByTenantAn... | public PageData<DeviceProfile> findAllByTenantId(TenantId tenantId, PageLink pageLink) {
return findDeviceProfiles(tenantId, pageLink);
}
@Override
public List<DeviceProfileFields> findNextBatch(UUID id, int batchSize) {
return deviceProfileRepository.findNextBatch(id, Limit.of(batchSize));... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\device\JpaDeviceProfileDao.java | 1 |
请完成以下Java代码 | private String cleanMavenCoordinate(String coordinate, String delimiter) {
String[] elements = coordinate.split("[^\\w\\-.]+");
if (elements.length == 1) {
return coordinate;
}
StringBuilder builder = new StringBuilder();
for (String element : elements) {
if (shouldAppendDelimiter(element, builder)) {
... | }
for (char c : VALID_MAVEN_SPECIAL_CHARACTERS) {
int prevIndex = builder.length() - 1;
if (element.charAt(0) == c || builder.charAt(prevIndex) == c) {
return false;
}
}
return true;
}
private String determineValue(String candidate, Supplier<String> fallback) {
return (StringUtils.hasText(candid... | repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\project\MetadataProjectDescriptionCustomizer.java | 1 |
请完成以下Java代码 | public class WorkflowEngineImpl implements WorkflowEngine {
@Override
public ProcessInstance runjBPMEngineForProcess(String processId, Context<String> initialContext, String kbaseId, String persistenceUnit) {
RuntimeManager manager = null;
RuntimeEngine engine = null;
ProcessInstance pI... | private KieBase getKieBase(String kbaseId) {
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieBase kbase = kContainer.getKieBase(kbaseId);
return kbase;
}
private RuntimeManager createJBPMRuntimeManager(KieBase kbase, String... | repos\tutorials-master\libraries-2\src\main\java\com\baeldung\jbpm\engine\WorkflowEngineImpl.java | 1 |
请完成以下Java代码 | public void setOvertimeCost (BigDecimal OvertimeCost)
{
set_Value (COLUMNNAME_OvertimeCost, OvertimeCost);
}
/** Get Overtime Cost.
@return Hourly Overtime Cost
*/
public BigDecimal getOvertimeCost ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OvertimeCost);
if (bd == null)
return Env.ZERO... | }
/** Set Valid to.
@param ValidTo
Valid to including this date (last day)
*/
public void setValidTo (Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
}
/** Get Valid to.
@return Valid to including this date (last day)
*/
public Timestamp getValidTo ()
{
return (Timestamp)get_Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_UserRemuneration.java | 1 |
请完成以下Java代码 | private C getContext(WebApplicationContext webApplicationContext) {
if (this.contextClass.isInstance(webApplicationContext)) {
return (C) webApplicationContext;
}
return webApplicationContext.getBean(this.contextClass);
}
/**
* Returns if the {@link WebApplicationContext} should be ignored and not used fo... | /**
* Returns {@code true} if the specified context is a
* {@link WebServerApplicationContext} with a matching server namespace.
* @param context the context to check
* @param serverNamespace the server namespace to match against
* @return {@code true} if the server namespace of the context matches
* @since... | repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\web\servlet\ApplicationContextRequestMatcher.java | 1 |
请完成以下Java代码 | public static Builder withAuthorizedClient(OAuth2AuthorizedClient authorizedClient) {
return new Builder(authorizedClient);
}
/**
* A builder for {@link OAuth2AuthorizationContext}.
*/
public static final class Builder {
private ClientRegistration clientRegistration;
private OAuth2AuthorizedClient autho... | /**
* Sets an attribute associated to the context.
* @param name the name of the attribute
* @param value the value of the attribute
* @return the {@link Builder}
*/
public Builder attribute(String name, Object value) {
if (this.attributes == null) {
this.attributes = new HashMap<>();
}
th... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\OAuth2AuthorizationContext.java | 1 |
请完成以下Java代码 | public static void main(String[] args) {
if (args.length < 2) {
System.err.println("Usage: `java TranslationPruner <source folder> <dest folder>`, where dest folder must contain the locale.constant-en_US.json for reference structure.");
System.exit(1);
}
try {
... | throw new IllegalArgumentException("Source JSON must be an object at root");
}
ObjectNode pruned = pruneNode((ObjectNode) sourceRoot, validKeys, "", mapper);
Separators seps = Separators.createDefaultInstance()
.withObjectFieldValueSpacing(Spacing.... | repos\thingsboard-master\tools\src\main\java\org\thingsboard\client\tools\i18n\TranslationPruner.java | 1 |
请完成以下Java代码 | public void updateActivity(final I_M_InOutLine inOutLine)
{
if (inOutLine.getC_Activity_ID() > 0)
{
return; // was already set, so don't try to auto-fill it
}
final ProductId productId = ProductId.ofRepoIdOrNull(inOutLine.getM_Product_ID());
if (productId == null)
{
return;
}
final ActivityId p... | if (productActivityId == null)
{
return;
}
final Dimension orderLineDimension = dimensionService.getFromRecord(inOutLine);
if (orderLineDimension == null)
{
//nothing to do
return;
}
dimensionService.updateRecord(inOutLine, orderLineDimension.withActivityId(productActivityId));
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\activity\model\validator\M_InOutLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Provider {
/**
* Authorization URI for the provider.
*/
private @Nullable String authorizationUri;
/**
* Token URI for the provider.
*/
private @Nullable String tokenUri;
/**
* User info URI for the provider.
*/
private @Nullable String userInfoUri;
/**
* User ... | return this.userInfoUri;
}
public void setUserInfoUri(@Nullable String userInfoUri) {
this.userInfoUri = userInfoUri;
}
public @Nullable String getUserInfoAuthenticationMethod() {
return this.userInfoAuthenticationMethod;
}
public void setUserInfoAuthenticationMethod(@Nullable String userInfoAuthen... | repos\spring-boot-4.0.1\module\spring-boot-security-oauth2-client\src\main\java\org\springframework\boot\security\oauth2\client\autoconfigure\OAuth2ClientProperties.java | 2 |
请完成以下Java代码 | public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getRemote_Addr());
}
/** Set Remote Host.
@param Remote_Host
Remote host Info
*/
public void setRemote_Host (String Remote_Host)
{
set_Value (COLUMNNAME_Remote_Host, Remote_Host);
}
/** Get Remote Host.
@return Re... | set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, null);
else
set_ValueNoCheck (COLUMNNAME_W_ClickCount_ID, Integer.valueOf(W_ClickCount_ID));
}
/** Get Click Count.
@return Web Click Management
*/
public int getW_ClickCount_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_W_ClickCount_ID);
if (ii ==... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Click.java | 1 |
请完成以下Java代码 | public int getAD_Role_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_C_DocType_ID, org.compiere.model.I_C_DocType... | else
set_ValueNoCheck (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
}
/** Get Belegart.
@return Document type or rules
*/
@Override
public int getC_DocType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Document_Action_Access.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void configureGlobalSecurity(
final AuthenticationManagerBuilder auth,
final MSV3ServerAuthenticationService msv3authService) throws Exception
{
auth.userDetailsService(msv3authService);
}
@Override
protected void configure(final HttpSecurity http) throws Exception
{
http
.csrf().disable()
... | }
@Bean
public BasicAuthenticationEntryPoint getBasicAuthEntryPoint()
{
final BasicAuthenticationEntryPoint authenticationEntryPoint = new BasicAuthenticationEntryPoint();
authenticationEntryPoint.setRealmName(REALM);
return authenticationEntryPoint;
}
/* To allow Pre-flight [OPTIONS] request from browser ... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\security\SecurityConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getAuthorityPrefix() {
return this.authorityPrefix;
}
public void setAuthorityPrefix(@Nullable String authorityPrefix) {
this.authorityPrefix = authorityPrefix;
}
public @Nullable String getAuthoritiesClaimDelimiter() {
return this.authoritiesClaimDelimiter;
}
public void... | * OAuth 2.0 endpoint through which token introspection is accomplished.
*/
private @Nullable String introspectionUri;
public @Nullable String getClientId() {
return this.clientId;
}
public void setClientId(@Nullable String clientId) {
this.clientId = clientId;
}
public @Nullable String getClient... | repos\spring-boot-4.0.1\module\spring-boot-security-oauth2-resource-server\src\main\java\org\springframework\boot\security\oauth2\server\resource\autoconfigure\OAuth2ResourceServerProperties.java | 2 |
请完成以下Java代码 | public class UmsAdminPermissionRelation implements Serializable {
private Long id;
private Long adminId;
private Long permissionId;
private Integer type;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
... | this.type = type;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", adminId=").append(adm... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsAdminPermissionRelation.java | 1 |
请完成以下Java代码 | public List<ActivityImpl> getInitialActivityStack() {
return getInitialActivityStack(initial);
}
public synchronized List<ActivityImpl> getInitialActivityStack(ActivityImpl startActivity) {
List<ActivityImpl> initialActivityStack = initialActivityStacks.get(startActivity);
if(initialActivityStack == nu... | */
public List<LaneSet> getLaneSets() {
if(laneSets == null) {
laneSets = new ArrayList<LaneSet>();
}
return laneSets;
}
public void setParticipantProcess(ParticipantProcess participantProcess) {
this.participantProcess = participantProcess;
}
public ParticipantProcess getParticipantP... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\ProcessDefinitionImpl.java | 1 |
请完成以下Spring Boot application配置 | spring:
datasource:
dynamic:
datasource:
master:
username: root
password: root
url: jdbc:mysql://127.0.0.1:3306/spring-boot-demo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=GMT%2B8
driver-class-... | &useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=GMT%2B8
driver-class-name: com.mysql.cj.jdbc.Driver
mp-enabled: true
logging:
level:
com.xkcoding.multi.datasource.mybatis: debug | repos\spring-boot-demo-master\demo-multi-datasource-mybatis\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | private Saml2X509Credential asSigningCredential(Signing.Credential properties) {
RSAPrivateKey privateKey = readPrivateKey(properties.getPrivateKeyLocation());
X509Certificate certificate = readCertificate(properties.getCertificateLocation());
return new Saml2X509Credential(privateKey, certificate, Saml2X509Crede... | }
catch (Exception ex) {
throw new IllegalArgumentException(ex);
}
}
private X509Certificate readCertificate(@Nullable Resource location) {
Assert.state(location != null, "No certificate location specified");
Assert.state(location.exists(), () -> "Certificate location '" + location + "' does not exist");... | repos\spring-boot-4.0.1\module\spring-boot-security-saml2\src\main\java\org\springframework\boot\security\saml2\autoconfigure\Saml2RelyingPartyRegistrationConfiguration.java | 2 |
请完成以下Java代码 | public void customizeSingle(ClassName className, Consumer<Builder> customizer) {
Builder builder = this.singleAnnotations.get(className);
if (builder != null) {
customizer.accept(builder);
}
}
/**
* Add a repeatable annotation.
* @param className the class name of an annotation
* @throws IllegalStateE... | * @param className the class name of the annotation
* @return {@code true} if such an annotation exists, {@code false} otherwise
*/
public boolean remove(ClassName className) {
return this.singleAnnotations.remove(className) != null || this.repeatableAnnotations.remove(className) != null;
}
/**
* Remove a s... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\AnnotationContainer.java | 1 |
请完成以下Java代码 | public IdentityLinkEntity create() {
return new IdentityLinkEntityImpl();
}
@Override
@SuppressWarnings("unchecked")
public List<IdentityLinkEntity> findIdentityLinksByTaskId(String taskId) {
return getDbSqlSession().selectList("selectIdentityLinksByTask", taskId);
}
@Override
... | Map<String, String> parameters = new HashMap<String, String>();
parameters.put("processInstanceId", processInstanceId);
parameters.put("userId", userId);
parameters.put("groupId", groupId);
parameters.put("type", type);
return getDbSqlSession().selectList("selectIdentityLinkByPro... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisIdentityLinkDataManager.java | 1 |
请完成以下Java代码 | int getPlayerNo() {
return playerNo;
}
void setPlayerNo(int playerNo) {
this.playerNo = playerNo;
}
int getOpponent() {
return 3 - playerNo;
}
public int getVisitCount() {
return visitCount;
}
public void setVisitCount(int visitCount) {
this.vi... | newState.setPlayerNo(3 - this.playerNo);
newState.getBoard().performMove(newState.getPlayerNo(), p);
possibleStates.add(newState);
});
return possibleStates;
}
void incrementVisit() {
this.visitCount++;
}
void addScore(double score) {
if (this.wi... | repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\mcts\montecarlo\State.java | 1 |
请完成以下Java代码 | public Amount subtract(@NonNull final Amount amtToSubtract)
{
assertSameCurrency(this, amtToSubtract);
if (amtToSubtract.isZero())
{
return this;
}
else
{
return new Amount(value.subtract(amtToSubtract.value), currencyCode);
}
}
public Amount multiply(@NonNull final Percent percent, @NonNull fi... | return !newValue.equals(value)
? new Amount(newValue, currencyCode)
: this;
}
public Amount abs()
{
return value.signum() < 0
? new Amount(value.abs(), currencyCode)
: this;
}
public Money toMoney(@NonNull final Function<CurrencyCode, CurrencyId> currencyIdMapper)
{
return Money.of(value, cu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\Amount.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void configure(AbstractEngineConfiguration engineConfiguration) {
if (eventEngineConfiguration == null) {
eventEngineConfiguration = new StandaloneEventRegistryEngineConfiguration();
}
initialiseEventRegistryEngineConfiguration(eventEngineConfiguration);
initialiseCom... | @Override
protected EventRegistryEngine buildEngine() {
if (eventEngineConfiguration == null) {
throw new FlowableException("EventRegistryEngineConfiguration is required");
}
return eventEngineConfiguration.buildEventRegistryEngine();
}
public EventRegistryEngineConfigu... | repos\flowable-engine-main\modules\flowable-event-registry-configurator\src\main\java\org\flowable\eventregistry\impl\configurator\EventRegistryEngineConfigurator.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public EventSubscriptionBuilder scopeId(String scopeId) {
this.scopeId = scopeId;
return this;
}
@Override
public EventSubscriptionBuilder scopeDefinitionId(String scopeDefinitionId) {
this.scopeDefinitionId = scopeDefinitionId;
return this;
}
@Override
publ... | @Override
public String getSubScopeId() {
return subScopeId;
}
@Override
public String getScopeId() {
return scopeId;
}
@Override
public String getScopeDefinitionId() {
return scopeDefinitionId;
}
@Override
public String getScopeDefinitionKey() {
... | repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\impl\EventSubscriptionBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class JWTRelayGatewayFilterFactory extends AbstractGatewayFilterFactory<Object> {
private static final String BEARER = "Bearer ";
private ReactiveJwtDecoder jwtDecoder;
public JWTRelayGatewayFilterFactory(ReactiveJwtDecoder jwtDecoder) {
this.jwtDecoder = jwtDecoder;
}
@Override
... | }
String token = this.extractToken(bearerToken);
return jwtDecoder.decode(token).thenReturn(withBearerAuth(exchange, token)).flatMap(chain::filter);
};
}
private String extractToken(String bearerToken) {
if (StringUtils.hasText(bearerToken) && bearerToken.length() > 7 &&... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\security\jwt\JWTRelayGatewayFilterFactory.java | 2 |
请完成以下Java代码 | public final class mysqlJavaTypeUtil {
public static final HashMap<String, String> mysqlJavaTypeMap = new HashMap<String, String>();
public static final HashMap<String, String> mysqlSwaggerTypeMap =new HashMap<String, String>();
static{
mysqlJavaTypeMap.put("bigint","Long");
mysqlJavaType... | mysqlSwaggerTypeMap.put("mediumint","integer");
mysqlSwaggerTypeMap.put("integer","integer");
mysqlSwaggerTypeMap.put("boolean","boolean");
mysqlSwaggerTypeMap.put("float","number");
mysqlSwaggerTypeMap.put("double","number");
mysqlSwaggerTypeMap.put("decimal","number");
... | repos\SpringBootCodeGenerator-master\src\main\java\com\softdev\system\generator\util\mysqlJavaTypeUtil.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Book getBook() {
return book;
}
pu... | if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (!(obj instanceof BookReview)) {
return false;
}
return id != null && id.equals(((BookReview) obj).id);
}
@Override
public int hashCode() {
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootDomainEvents\src\main\java\com\bookstore\entity\BookReview.java | 1 |
请完成以下Java代码 | public void setColor (Color color)
{
int rgba = color.getRGB();
super.setCode(String.valueOf(rgba));
} // setColor
/**
* Get Color as RRGGBB hex string for HTML font tag
* @return rgb hex value
*/
public String getRRGGBB()
{
Color color = getColor();
StringBuffer sb = new StringBuffer();
sb.appen... | "Cyan", "Magenta", "Orange", "Pink", "Yellow",
"Blue dark"};
for (int i = 0; i < colors.length; i++)
System.out.println(names[i] + " = " + colors[i] + " RGB=" + colors[i].getRGB()
+ " -> " + new Color(colors[i].getRGB(), false)
+ " -> " + new Color(colors[i].getRGB(), true));
/**
// Create Colors
fo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\MPrintColor.java | 1 |
请完成以下Java代码 | public boolean containsAttribute(@NonNull final AttributeSetId attributeSetId, @NonNull final AttributeId attributeId)
{
return getAttributeSetDescriptorById(attributeSetId).contains(attributeId);
}
@Override
@Nullable
public I_M_Attribute retrieveAttribute(final AttributeSetId attributeSetId, final AttributeId... | map = Maps.uniqueIndex(list, AttributeListValue::getValue);
}
public List<AttributeListValue> toList()
{
return ImmutableList.copyOf(map.values());
}
@Nullable
public AttributeListValue getByIdOrNull(@NonNull final AttributeValueId id)
{
return map.values()
.stream()
.filter(av -> Attrib... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributeDAO.java | 1 |
请完成以下Java代码 | public void execute(DelegateExecution execution) {
SubProcess subProcess = getSubProcessFromExecution(execution);
FlowElement startElement = null;
if (CollectionUtil.isNotEmpty(subProcess.getFlowElements())) {
for (FlowElement subElement : subProcess.getFlowElements()) {
... | FlowElement flowElement = execution.getCurrentFlowElement();
SubProcess subProcess = null;
if (flowElement instanceof SubProcess) {
subProcess = (SubProcess) flowElement;
} else {
throw new ActivitiException(
"Programmatic error: sub process behaviour can ... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\SubProcessActivityBehavior.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CommentDTO other = (CommentDTO) obj;
if (comment == null) {
if (other.comment != null)
return false;
} else if (!comment.equals(other.comment))
... | *
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "CommentDTO [taskId=" + taskId + ", comment=" + comment + ", posted=" + posted + "]";
}
}
/**
* Custom date serializer that converts the date to long before sending it out
*
* @author anilallewar
*
*/
class CustomDateT... | repos\spring-boot-microservices-master\comments-webservice\src\main\java\com\rohitghatol\microservices\comments\dtos\CommentDTO.java | 2 |
请完成以下Java代码 | public class MyBatisPlusGenerator extends BaseGenerator {
public static final String OUT_DIR = "D:\\github\\spring-boot-quick\\quick-archetype\\src\\main\\java";
// 处理 all 情况
protected static List<String> getTables(String tables) {
return "all".equals(tables) ? Collections.emptyList() : Arrays.as... | .enableTableFieldAnnotation()
.versionColumnName("version")
.logicDeleteColumnName("is_delete")
.columnNaming(NamingStrategy.underline_to_camel)
// .idType(IdType.AUTO)
.formatFileN... | repos\spring-boot-quick-master\quick-sample-server\sample-server\src\main\java\com\quick\utils\MyBatisPlusGenerator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class EmployeeRepositoryImpl implements EmployeeRepository {
final @NonNull EntityManager entityManager;
/*
* (non-Javadoc)
* @see example.springdata.jpa.compositions.EmployeeRepository#findCoworkers(example.springdata.jpa.compositions.Employee)
*/
@Override
@SuppressWarnings("unchecked")
public Lis... | }
/*
* (non-Javadoc)
* @see example.springdata.jpa.compositions.EmployeeRepository#findSubordinates(example.springdata.jpa.compositions.Employee)
*/
@Override
@SuppressWarnings("unchecked")
public List<Employee> findSubordinates(Employee manager) {
return entityManager.createQuery("SELECT u from User u wh... | repos\spring-data-examples-main\jpa\example\src\main\java\example\springdata\jpa\compositions\EmployeeRepositoryImpl.java | 2 |
请完成以下Java代码 | public class RestartProcessInstanceDto {
protected List<String> processInstanceIds;
protected List<ProcessInstanceModificationInstructionDto> instructions;
protected HistoricProcessInstanceQueryDto historicProcessInstanceQuery;
protected boolean initialVariables;
protected boolean skipCustomListeners;
prot... | public boolean isSkipIoMappings() {
return skipIoMappings;
}
public void setSkipIoMappings(boolean skipIoMappings) {
this.skipIoMappings = skipIoMappings;
}
public boolean isWithoutBusinessKey() {
return withoutBusinessKey;
}
public void setWithoutBusinessKey(boolean withoutBusinessKey) {
... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\RestartProcessInstanceDto.java | 1 |
请完成以下Java代码 | 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);
}
/**
* NotificationType AD... | public static final String NOTIFICATIONTYPE_NotifyUserInCharge = "O";
/** Set Benachrichtigungs-Art.
@param NotificationType
Art der Benachrichtigung
*/
@Override
public void setNotificationType (java.lang.String NotificationType)
{
set_Value (COLUMNNAME_NotificationType, NotificationType);
}
/** Get ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Role_NotificationGroup.java | 1 |
请完成以下Java代码 | private void startWindow(final int AD_Workbench_ID, @Nullable final AdWindowId adWindowId)
{
// metas-ts: task 05796: moved the code to WindowBL.openWindow() to allow it beeing called on other occasions too
Services.get(IWindowBL.class).openWindow(
m_menu.getWindowManager(),
AD_Workbench_ID,
adWindowId... | * @param AD_Task_ID task
*/
private void startTask(final int AD_Task_ID)
{
// Get Command
MTask task = null;
if (AD_Task_ID > 0)
{
task = new MTask(Env.getCtx(), AD_Task_ID, ITrx.TRXNAME_None);
}
if (task.getAD_Task_ID() != AD_Task_ID)
{
task = null;
}
if (task == null)
{
return;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AMenuStartItem.java | 1 |
请完成以下Java代码 | public class InvalidKeyExamples {
public static byte[] decryptUsingCBCWithNoIV(SecretKey key, byte[] cipherTextBytes)
throws InvalidKeyException, GeneralSecurityException {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, key);
return... | cipher.init(Cipher.ENCRYPT_MODE, encryptionKey);
return cipher.doFinal(bytes);
}
public static byte[] encryptWithKeyTooLong() throws InvalidKeyException, GeneralSecurityException {
SecretKey encryptionKey = CryptoUtils.getKeyForText("ThisTextIsTooLong");
String plainText = "https://www... | repos\tutorials-master\core-java-modules\core-java-security-3\src\main\java\com\baeldung\crypto\exception\InvalidKeyExamples.java | 1 |
请完成以下Java代码 | public de.metas.invoicecandidate.model.I_M_ProductGroup getM_ProductGroup()
{
return get_ValueAsPO(COLUMNNAME_M_ProductGroup_ID, de.metas.invoicecandidate.model.I_M_ProductGroup.class);
}
@Override
public void setM_ProductGroup(final de.metas.invoicecandidate.model.I_M_ProductGroup M_ProductGroup)
{
set_Value... | @Override
public int getM_ProductGroup_ID()
{
return get_ValueAsInt(COLUMNNAME_M_ProductGroup_ID);
}
@Override
public void setM_ProductGroup_Product_ID (final int M_ProductGroup_Product_ID)
{
if (M_ProductGroup_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_ProductGroup_Product_ID, null);
else
set... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\invoicecandidate\model\X_M_ProductGroup_Product.java | 1 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final IQueryBL queryBL = Services.get(IQueryBL.class);
final ITrxItemProcessorExecutorService trxItemProcessorExecutorService = Services.get(ITrxItemProcessorExecutorService.class);
// gh #1955: prevent an OutOfMemoryError
final IQueryFilter<I_DLM_Partition> process... | .setExceptionHandler(LoggableTrxItemExceptionHandler.instance)
.process(partitionsToMigrate);
return MSG_OK;
}
private void process0(final I_DLM_Partition partitionDB)
{
final Partition partition = dlmService.loadPartition(partitionDB);
if (testMigrate)
{
migratorService.testMigratePartition(partit... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\migrator\process\DLM_Partition_Migrate.java | 1 |
请完成以下Java代码 | private String createNewToken() {
return UUID.randomUUID().toString();
}
private Cookie mapToCookie(ResponseCookie responseCookie) {
Cookie cookie = new Cookie(responseCookie.getName(), responseCookie.getValue());
cookie.setSecure(responseCookie.isSecure());
cookie.setPath(responseCookie.getPath());
cookie... | * functionality which uses the request context as the path.
* @param path the path to use
*/
public void setCookiePath(String path) {
this.cookiePath = path;
}
/**
* Get the path that the CSRF cookie will be set to.
* @return the path to be used.
*/
public @Nullable String getCookiePath() {
return th... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\csrf\CookieCsrfTokenRepository.java | 1 |
请完成以下Java代码 | public static void main(String[] args) {
int[] numbers = new int[] { 1, 2, 3, 4, 5 };
getArrayElementAtIndex(numbers, 5);
getListElementAtIndex(5);
addArrayElementsUsingLoop(numbers);
}
public static void addArrayElementsUsingLoop(int[] numbers) {
int sum = 0;
f... | } catch (ArrayIndexOutOfBoundsException e) {
LOG.info("Attempted to access an index outside array bounds: {}", e.getMessage());
return -1;
}
return sum;
}
public static int getListElementAtIndex(int index) {
List<Integer> numbersList = Arrays.asList(1, 2, 3, 4, ... | repos\tutorials-master\core-java-modules\core-java-exceptions-4\src\main\java\com\baeldung\exception\arrayindexoutofbounds\ArrayIndexOutOfBoundsExceptionDemo.java | 1 |
请完成以下Java代码 | public void run(final String localTrxName)
{
createTerm(partner, flatrateTermsCollector);
Loggables.addLog("@Processed@ @C_BPartner_ID@:" + partner.getValue() + "_" + partner.getName());
logger.debug("Created contract(s) for {}", partner);
}
// note for future developer: this swallows ... | .context(context)
.bPartner(partner)
.conditions(conditions)
.startDate(startDate)
.endDate(endDate)
.userInCharge(userInCharge)
.productAndCategoryId(createProductAndCategoryId(product))
.isSimulation(isSimulation)
.completeIt(isCompleteDocument)
.build();
flatrateTermC... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\process\FlatrateTermCreator.java | 1 |
请完成以下Java代码 | public static String read(final Path path) throws MojoExecutionException {
try {
return new String(Files.readAllBytes(path));
} catch (IOException e) {
throw new MojoExecutionException("Unable to read file " + path, e);
}
}
/**
* Write to a file.
*
... | }
/**
* Load a file into properties.
*
* @param path the path
* @param properties the properties to mutate
* @throws org.apache.maven.plugin.MojoExecutionException if any.
*/
public static void load(final Path path, final Properties properties)
throws MojoExecuti... | repos\jasypt-spring-boot-master\jasypt-maven-plugin\src\main\java\com\ulisesbocchio\jasyptmavenplugin\mojo\FileService.java | 1 |
请完成以下Java代码 | public java.lang.String getSKU ()
{
return (java.lang.String)get_Value(COLUMNNAME_SKU);
}
/** Set UPC/EAN.
@param UPC
Bar Code (Universal Product Code or its superset European Article Number)
*/
@Override
public void setUPC (java.lang.String UPC)
{
set_Value (COLUMNNAME_UPC, UPC);
}
/** Get UPC/E... | return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_C_ElementValue getUser2() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class);
}
@Override
public void setUser2(org.compiere.model.I_C_ElementValue User2)
{
set_ValueFromPO(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_GLJournal.java | 1 |
请完成以下Java代码 | public IdGenerator getIdGenerator() {
return idGenerator;
}
public void setIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
}
public ParsedDeploymentBuilderFactory getExParsedDeploymentBuilderFactory() {
return parsedDeploymentBuilderFactory;
}
pu... | return cachingAndArtifactsManager;
}
public void setCachingAndArtifactsManager(CachingAndArtifactsManager manager) {
this.cachingAndArtifactsManager = manager;
}
public void setDisableExistingStartEventSubscriptions(boolean disableExistingStartEventSubscriptions) {
this.disableExisting... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\deployer\BpmnDeployer.java | 1 |
请完成以下Java代码 | public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set Print Text.
@param PrintName
The label text to be printed on a document or correspondence.
*/
public void setPrintName (String PrintName)
{
set_Value (COLUMNNAME_PrintName, PrintName);
}
/** Get Print Text.
@return T... | public int getXPosition ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_XPosition);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Y Position.
@param YPosition
Absolute Y (vertical) position in 1/72 of an inch
*/
public void setYPosition (int YPosition)
{
set_Value (COLUMNNAME_YPos... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintLabelLine.java | 1 |
请完成以下Java代码 | public void handleEvent(@NonNull final AbstractPurchaseOfferEvent event)
{
final UpdateMainDataRequest dataUpdateRequest = createDataUpdateRequestForEvent(event, false);
dataUpdateRequestHandler.handleDataUpdateRequest(dataUpdateRequest);
final UpdateMainDataRequest dataUpdateRequestForNextDayQty = createDataUp... | .productDescriptor(purchaseOfferedEvent.getProductDescriptor())
.date(dateToUse)
.build();
final UpdateMainDataRequest.UpdateMainDataRequestBuilder request = UpdateMainDataRequest.builder()
.identifier(identifier);
if (forNextDayQty)
{
request.offeredQtyNextDay(purchaseOfferedEvent.getQtyDelta())... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\view\eventhandler\AbstractPurchaseOfferEventHandler.java | 1 |
请完成以下Java代码 | public class Person {
private String name;
private Integer age;
public Person(String name, Integer age) {
this.name = name;
this.age = age;
}
// comment this constructor to see the error.
public Person() {
}
public String getName() {
return name;
... | public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
} | repos\tutorials-master\core-java-modules\core-java-lang-oop-constructors-2\src\main\java\com\baeldung\implicitsuperconstructorundefined\Person.java | 1 |
请完成以下Java代码 | public static class MyState {
final Stream<Integer> getIntegers() {
return IntStream.range(1, 1000000)
.boxed();
}
final Predicate<Integer> PREDICATE = i -> i == 751879;
}
@Benchmark
public void evaluateFindUniqueElementMatchingPredicate_WithReduction(Bl... | try {
FilterUtils.getUniqueElementMatchingPredicate_WithReduction(state.getIntegers(), state.PREDICATE);
} catch (IllegalStateException exception) {
blackhole.consume(exception);
}
}
@Benchmark
public void evaluateGetUniqueElementMatchingPredicate_WithCollectingAndTh... | repos\tutorials-master\core-java-modules\core-java-streams-4\src\main\java\com\baeldung\streams\filteronlyoneelement\BenchmarkRunner.java | 1 |
请完成以下Java代码 | public Object getValue(ELContext context, Object base, Object property) {
if (resolve(context, base, property)) {
if (!isProperty((String) property)) {
throw new PropertyNotFoundException("Cannot find property " + property);
}
return getProperty((String) prope... | * property name
* @return value associated with the given property
*/
public Object getProperty(String property) {
return map.get(property);
}
/**
* Set property value
*
* @param property
* property name
* @param value
* prope... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\util\RootPropertyResolver.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.