instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | private void createFactsForLine(@NonNull final Fact fact, @NonNull final DocLine_CostRevaluation docLine)
{
final AcctSchema acctSchema = fact.getAcctSchema();
final CostAmount costs = docLine.getCreateCosts(acctSchema);
//
// Revenue
// -------------------
// Product Asset DR
// Revenue C... | //
// Expense
// ------------------------------------
// Product Asset CR
// Expense DR
else // deltaAmountToBook.signum() < 0
{
fact.createLine()
.setDocLine(docLine)
.setAccount(docLine.getAccount(ProductAcctType.P_Asset_Acct, acctSchema))
.setAmtSource(null, costs.ne... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_CostRevaluation.java | 1 |
请完成以下Java代码 | public final class DeviceAccessor
{
private static final Logger logger = LogManager.getLogger(DeviceAccessor.class);
@Getter
private final DeviceId id;
@Getter
private final DeviceConfig deviceConfig;
@Getter
private final ITranslatableString displayName;
private final IDevice device;
private final IDevic... | public synchronized void beforeAcquireValue(@NonNull final Map<String, List<String>> parameters)
{
final Map<String, List<String>> runParameters = Stream.concat(parameters.entrySet().stream(),
getDeviceConfigParams().entrySet().stream())
.collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, ... | repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\accessor\DeviceAccessor.java | 1 |
请完成以下Java代码 | protected Map<String, VariableInstanceEntity> createCaseVariablesFromHistoricCaseInstance(HistoricCaseInstance historicCaseInstance) {
VariableService variableService = cmmnEngineConfiguration.getVariableServiceConfiguration().getVariableService();
List<HistoricVariableInstance> variables = cmmnEngineCo... | }
return newVars;
}
return Collections.emptyMap();
}
@Override
public void callCaseInstanceStateChangeCallbacks(CallbackData callbackData) {
String callbackId = callbackData.getCallbackId();
String callbackType = callbackData.getCallbackType();
if (callba... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceHelperImpl.java | 1 |
请完成以下Java代码 | public void setTenantIdIn(List<String> tenantIds) {
this.tenantIds = tenantIds;
}
@CamundaQueryParam(value = "withoutTenantId", converter = BooleanConverter.class)
public void setWithoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = withoutTenantId;
}
@Override
protected void applyFilt... | query.withoutTenantId();
}
}
@Override
protected void applySortBy(HistoricIdentityLinkLogQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) {
if (sortBy.equals(SORT_BY_TIME)) {
query.orderByTime();
} else if (sortBy.equals(SORT_BY_TYPE)) {
query.orderByType(... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricIdentityLinkLogQueryDto.java | 1 |
请完成以下Java代码 | private ImmutableMap<TableRecordReference, CommentSummary> retrieveCommentSummaries(
@NonNull final Collection<TableRecordReference> references)
{
if (references.isEmpty())
{
return ImmutableMap.of();
}
final ImmutableSetMultimap<Integer, Integer> recordIdsByTableId = references.stream()
.collect(Imm... | .hasComments(referencesWithComments.contains(reference))
.build())
.collect(GuavaCollectors.toImmutableMapByKey(CommentSummary::getReference));
}
private IQuery<I_CM_Chat> createCMChatQueryByTableAndRecordIds(final int tableId, final Set<Integer> recordIds)
{
return queryBL.createQueryBuilder(I_CM_Chat.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\comments\CommentsRepository.java | 1 |
请完成以下Java代码 | public class GatewayControllerEndpoint extends AbstractGatewayControllerEndpoint {
public GatewayControllerEndpoint(List<GlobalFilter> globalFilters, List<GatewayFilterFactory> gatewayFilters,
List<RoutePredicateFactory> routePredicates, RouteDefinitionWriter routeDefinitionWriter,
RouteLocator routeLocator, Ro... | r.put("filters", filters);
return r;
}
@GetMapping("/routes/{id}")
public Mono<ResponseEntity<Map<String, Object>>> route(@PathVariable String id) {
// @formatter:off
return this.routeLocator.getRoutes()
.filter(route -> route.getId().equals(id))
.singleOrEmpty()
.map(this::serialize)
.map(Res... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\actuate\GatewayControllerEndpoint.java | 1 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | */
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Comment/Help.
@param Help
Comment or Hint
*/
public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@return Comment or Hint
*/
public String getHelp ()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Ad_Cat.java | 1 |
请完成以下Java代码 | public class DeleteProcessInstanceCommentCmd implements Command<Object>, Serializable {
private static final long serialVersionUID = 1L;
protected String commentId;
protected String processInstanceId;
public DeleteProcessInstanceCommentCmd(String processInstanceId, String commentId) {
this.processInstance... | }
logOperation(processInstance, commandContext);
return null;
}
protected void logOperation(ExecutionEntity processInstance, CommandContext commandContext) {
PropertyChange propertyChange = new PropertyChange("comment", null, null);
commandContext.getOperationLogManager()
.logCommentOpera... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\DeleteProcessInstanceCommentCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setBankOrderNo(String bankOrderNo) {
this.bankOrderNo = bankOrderNo == null ? null : bankOrderNo.trim();
}
public String getBankTrxNo() {
return bankTrxNo;
}
public void setBankTrxNo(String bankTrxNo) {
this.bankTrxNo = bankTrxNo == null ? null : bankTrxNo.trim();
}
public BigDecimal getOrder... | public void setPaySuccessTime(Date paySuccessTime) {
this.paySuccessTime = paySuccessTime;
}
public Date getCompleteTime() {
return completeTime;
}
public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
public String getIsRefund() {
return isRefund;
}
public void setIsR... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java | 2 |
请完成以下Java代码 | private Map<String, SqlDocumentFieldDataBindingDescriptor> getFieldsByFieldName()
{
return _fieldsByFieldName;
}
public SqlDocumentFieldDataBindingDescriptor getField(final String fieldName)
{
final SqlDocumentFieldDataBindingDescriptor field = getFieldsByFieldName().get(fieldName);
if (field == null)... | {
if (getFieldsByFieldName().get(FIELDNAME_Version) == null)
{
return Optional.empty();
}
final List<SqlDocumentFieldDataBindingDescriptor> keyColumns = getKeyFields();
if (keyColumns.size() != 1)
{
return Optional.empty();
}
final String keyColumnName = keyColumns.get(0).getColumnName... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlDocumentEntityDataBindingDescriptor.java | 1 |
请完成以下Java代码 | public final String getTitle()
{
return getName();
}
@Override
public final String getIcon()
{
return null;
}
@Override
public final boolean isAvailable()
{
final I_AD_Form form = getAD_Form();
return form != null;
}
@Override
public final boolean isRunnable()
{
final I_AD_Form form = getAD_Fo... | }
protected final int getAD_Form_ID()
{
return _adFormId;
}
private final synchronized I_AD_Form getAD_Form()
{
if (!_adFormLoaded)
{
_adForm = retrieveAD_Form();
_adFormLoaded = true;
}
return _adForm;
}
private final I_AD_Form retrieveAD_Form()
{
final IContextMenuActionContext context = ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\OpenFormContextMenuAction.java | 1 |
请完成以下Java代码 | public abstract class AbstractHUDocumentLine implements IHUDocumentLine
{
protected final transient Logger logger = LogManager.getLogger(getClass());
private final IProductStorage storage;
private final Object referenceModel;
private boolean readonly = false;
public AbstractHUDocumentLine(final IProductStorage s... | public Object getTrxReferencedModel()
{
return referenceModel;
}
protected IProductStorage getStorage()
{
return storage;
}
@Override
public IAllocationSource createAllocationSource(final I_M_HU hu)
{
return HUListAllocationSourceDestination.of(hu);
}
@Override
public boolean isReadOnly()
{
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\AbstractHUDocumentLine.java | 1 |
请完成以下Java代码 | public script setSrc (String src)
{
addAttribute ("src", src);
return this;
}
/**
* Sets the type="" attribute
*
* @param type
* the type="" attribute
*/
public script setType (String type)
{
addAttribute ("type", type);
return this;
}
/**
* Sets the language="" attribute
*
... | public script addElement (String hashcode, String element)
{
addElementToRegistry (hashcode, element);
return (this);
}
/**
* Adds an Element to the element.
*
* @param element
* Adds an Element to the element.
*/
public script addElement (Element element)
{
addElementToRegistry (eleme... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\script.java | 1 |
请完成以下Java代码 | public void start() throws InterruptedException {
// 创建 ServerBootstrap 对象,用于 Netty Server 启动
ServerBootstrap bootstrap = new ServerBootstrap();
// 设置 ServerBootstrap 的各种属性
bootstrap.group(bossGroup, workerGroup) // 设置两个 EventLoopGroup 对象
.channel(NioServerSocketChannel.c... | /**
* 关闭 Netty Server
*/
@PreDestroy
public void shutdown() {
// 关闭 Netty Server
if (channel != null) {
channel.close();
}
// 优雅关闭两个 EventLoopGroup 对象
bossGroup.shutdownGracefully();
workerGroup.shutdownGracefully();
}
} | repos\SpringBoot-Labs-master\lab-67\lab-67-netty-demo\lab-67-netty-demo-server\src\main\java\cn\iocoder\springboot\lab67\nettyserverdemo\server\NettyServer.java | 1 |
请完成以下Java代码 | public class TwelveMonkeysExample {
public static void main(String[] args) throws IOException {
BufferedImage image = loadImage();
drawRectangle(image);
displayImage(image);
}
private static BufferedImage loadImage() throws IOException {
String imagePath = TwelveMonkeysExam... | g.setColor(Color.BLUE);
g.drawRect(10, 10, image.getWidth() - 20, image.getHeight() - 20);
}
private static void displayImage(BufferedImage image) {
JLabel picLabel = new JLabel(new ImageIcon(image));
JPanel jPanel = new JPanel();
jPanel.add(picLabel);
JFrame f = new J... | repos\tutorials-master\image-processing\src\main\java\com\baeldung\imageprocessing\twelvemonkeys\TwelveMonkeysExample.java | 1 |
请完成以下Java代码 | public class AuthorizationCodeGrantTypeHandler extends AbstractGrantTypeHandler {
@PersistenceContext
private EntityManager entityManager;
@Override
public JsonObject createAccessToken(String clientId, MultivaluedMap<String, String> params) throws Exception {
//1. code is required
Stri... | }
//client match
if (!clientId.equals(authorizationCode.getClientId())) {
throw new WebApplicationException("invalid_grant");
}
//3. JWT Payload or claims
String accessToken = getAccessToken(clientId, authorizationCode.getUserId(), authorizationCode.getApprovedScopes... | repos\tutorials-master\security-modules\oauth2-framework-impl\oauth2-authorization-server\src\main\java\com\baeldung\oauth2\authorization\server\handler\AuthorizationCodeGrantTypeHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public LogoutSuccessHandler webSecurityUserLogoutHandler() {
return (request, response, authentication) -> {
System.out.println("User logged out successfully!");
response.sendRedirect("/app");
};
}
@Bean
@Profile("inmemory")
public UserDetailsService inMemoryUserDeta... | JdbcUserDetailsManager jdbcUserDetailsManager = new JdbcUserDetailsManager(dataSource);
UserDetails user = User.builder()
.username("user")
.password(passwordEncoder.encode("password"))
.roles("USER")
.build();
UserDetails admin = User.builder()
.usernam... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-5\src\main\java\com\baeldung\securityconfig\configuration\SecurityConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class OrderPaymentReservationService
{
private final IOrderBL ordersService = Services.get(IOrderBL.class);
private final IBPartnerDAO bpartnersRepo = Services.get(IBPartnerDAO.class);
private final PaymentReservationService paymentReservationService;
public OrderPaymentReservationService(
@NonNull final... | private PaymentReservation createPaymentReservation(final I_C_Order salesOrder)
{
final BPartnerContactId payerContactId = ordersService.getBillToContactId(salesOrder);
return paymentReservationService.createReservation(PaymentReservationCreateRequest.builder()
.clientId(ClientId.ofRepoId(salesOrder.getAD_Cli... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\payment_reservation\OrderPaymentReservationService.java | 2 |
请完成以下Java代码 | public class RetryInterceptor extends AbstractCommandInterceptor {
private static Logger log = LoggerFactory.getLogger(RetryInterceptor.class);
protected int numOfRetries = 3;
protected int waitTimeInMs = 50;
protected int waitIncreaseFactor = 5;
public <T> T execute(CommandConfig config, Command... | Thread.sleep(waitTime);
} catch (InterruptedException e) {
log.debug("I am interrupted while waiting for a retry.");
}
}
public void setNumOfRetries(int numOfRetries) {
this.numOfRetries = numOfRetries;
}
public void setWaitIncreaseFactor(int waitIncreaseFactor) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\interceptor\RetryInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProxyController {
private static final String baseUrlDefault = "http://localhost:8087";
private final OkHttpClient client;
private String baseUrl;
public ProxyController() {
client = new OkHttpClient();
baseUrl = baseUrlDefault;
}
@GetMapping("/data")
public R... | .url(baseUrl + "/data")
.get()
.build();
Response response = client.newCall(request).execute();
return ResponseEntity.ok(response.body().string());
} catch (IOException e) {
return ResponseEntity.badRequest().build();
}
}
... | repos\spring-examples-java-17\spring-mockwebserver\src\main\java\itx\spring\demo\proxy\controller\ProxyController.java | 2 |
请完成以下Java代码 | public void addArtifact(Artifact artifact) {
artifactList.add(artifact);
addArtifactToMap(artifact);
}
@Override
public void addArtifactToMap(Artifact artifact) {
if (artifact != null && StringUtils.isNotEmpty(artifact.getId())) {
artifactMap.put(artifact.getId(), ar... | if (otherElement.getDataObjects() != null && !otherElement.getDataObjects().isEmpty()) {
for (ValuedDataObject dataObject : otherElement.getDataObjects()) {
ValuedDataObject clone = dataObject.clone();
dataObjects.add(clone);
// add it to the list of FlowEleme... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\SubProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
r... | }
public void setPostCode(String postCode) {
this.postCode = postCode;
}
@Override
public String toString() {
return "LocationCreateReq{" +
"location='" + location + '\'' +
", name='" + name + '\'' +
", phone='" + phone + '\'' +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\user\LocationCreateReq.java | 2 |
请完成以下Java代码 | protected void internalExecute() {
CmmnHistoryManager cmmnHistoryManager = CommandContextUtil.getCmmnHistoryManager(commandContext);
cmmnHistoryManager.recordPlanItemInstanceReactivated(planItemInstanceEntity);
// Extending classes might override getNewState, so need to check the available stat... | return PlanItemInstanceState.UNAVAILABLE;
} else {
return PlanItemInstanceState.AVAILABLE;
}
}
@Override
public String getLifeCycleTransition() {
return PlanItemTransition.REACTIVATE;
}
@Override
public String getOperationName() {
return "[Reactivate... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\ReactivatePlanItemInstanceOperation.java | 1 |
请完成以下Java代码 | public int getAD_Column_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Image.
@param AD_Image_ID
Image or Icon
*/
public void setAD_Image_ID (int AD_Image_ID)
{
if (AD_Image_ID < 1)
set_Value (COLUMNNAME_AD_Image... | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** EntityType AD_Reference_ID=389 */
public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entity Type.
@param EntityType
Dictionary Entity Type; Determines ownership and synchronization
*/
public void set... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Workbench.java | 1 |
请完成以下Java代码 | public class ConnectionTypeDefinitionConfigurer implements TypeDefinitionConfigurer {
private static final TypeName STRING_TYPE = new TypeName("String");
private static final TypeName BOOLEAN_TYPE = new TypeName("Boolean");
private static final TypeName PAGE_INFO_TYPE = new TypeName("PageInfo");
@Override
pub... | .name(edgeTypeName)
.fieldDefinition(initFieldDefinition("cursor", new NonNullType(STRING_TYPE)))
.fieldDefinition(initFieldDefinition("node", new NonNullType(new TypeName(typeName))))
.build());
});
}
}
private static Set<String> findConnectionTypeNames(TypeDefinitionRegistry registry) {
re... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\ConnectionTypeDefinitionConfigurer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class DataRepositoryMetricsAutoConfiguration {
private final DataMetricsProperties properties;
DataRepositoryMetricsAutoConfiguration(DataMetricsProperties properties) {
this.properties = properties;
}
@Bean
@ConditionalOnMissingBean(RepositoryTagsProvider.class)
DefaultRepositoryTagsProvider re... | @ConditionalOnMissingBean
MetricsRepositoryMethodInvocationListener metricsRepositoryMethodInvocationListener(
ObjectProvider<MeterRegistry> registry, RepositoryTagsProvider tagsProvider) {
Repository properties = this.properties.getRepository();
return new MetricsRepositoryMethodInvocationListener(registry::ge... | repos\spring-boot-4.0.1\module\spring-boot-data-commons\src\main\java\org\springframework\boot\data\autoconfigure\metrics\DataRepositoryMetricsAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class JsonMHUPIItemProduct
{
@ApiModelProperty( //
dataType = "java.lang.Integer", //
value = "Corresponding to `M_HU_PI_Item_Product.M_HU_PI_Item_Product_ID`.")
@NonNull
@JsonProperty("mHUPIItemProductId")
JsonMetasfreshId mHUPIItemProductId;
@ApiModelProperty( //
allowEmptyValue = true, //
da... | dataType = "java.lang.String", //
value = "Corresponding to `M_HU_PI_Item_Product.Name`.")
@Nullable
@JsonProperty("name")
String name;
@ApiModelProperty("Corresponding to M_HU_PI_Item_Product.Qty")
@NonNull
@JsonProperty("qty")
BigDecimal qty;
@ApiModelProperty("This is the `C_UOM.X12DE355` of the M_HU_PI... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\response\JsonMHUPIItemProduct.java | 2 |
请完成以下Java代码 | public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getStringRepresentation()
{
return stringRepresentation;
}
public void setStringRepresentation(String stringRepresentation)
{
this.stringRepresentation = stringRepresentation;
}
@Overrid... | return true;
//
SponsorNoObject sno = (SponsorNoObject)obj;
return this.sponsorNo == sno.sponsorNo;
}
@Override
public String toString()
{
String str = getStringRepresentation();
if (str != null)
return str;
return sponsorNo + ", " + name;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\SponsorNoObject.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ForecastLineId
{
int repoId;
@NonNull
ForecastId forecastId;
public static ForecastLineId ofRepoId(@NonNull final ForecastId forecasteId, final int forecastlineId)
{
return new ForecastLineId(forecasteId, forecastlineId);
}
public static ForecastLineId ofRepoId(final int forecastId, final int f... | public static ForecastLineId ofRepoIdOrNull(
@Nullable final ForecastId forecastId,
final int forecastLineId)
{
return forecastId != null && forecastLineId > 0 ? ofRepoId(forecastId, forecastLineId) : null;
}
private ForecastLineId(@NonNull final ForecastId forecastId, final int forecastLineId)
{
this.re... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\mforecast\impl\ForecastLineId.java | 2 |
请完成以下Java代码 | public class WebController {
private static final int DEFAULT_PORT = 8080;
@Setter
private int serverPort = DEFAULT_PORT;
@GetMapping("/tweets-blocking")
public List<Tweet> getTweetsBlocking() {
log.info("Starting BLOCKING Controller!");
final String uri = getSlowServiceUri();
... | log.info("Starting NON-BLOCKING Controller!");
Flux<Tweet> tweetFlux = WebClient.create()
.get()
.uri(getSlowServiceUri())
.retrieve()
.bodyToFlux(Tweet.class);
tweetFlux.subscribe(tweet -> log.info(tweet.toString()));
log.info("Exiting NON-BLOCKING Contr... | repos\tutorials-master\spring-reactive-modules\spring-reactive\src\main\java\com\baeldung\reactive\webclient\WebController.java | 1 |
请完成以下Java代码 | public void setPrice(int price) {
this.price = price;
}
/*
public Long getSku() {
return sku;
}
public void setSku(Long sku) {
this.sku = sku;
}
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
... | Book other = (Book) o;
return Objects.equals(isbn, other.getIsbn());
// including sku
// return Objects.equals(isbn, other.getIsbn())
// && Objects.equals(sku, other.getSku());
}
@Override
public int hashCode() {
return Objects.hash(isbn);
// includin... | repos\Hibernate-SpringBoot-master\HibernateSpringBootNaturalId\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public @Nullable InvocationResult getInvocationResultFor(Object result, Object inboundPayload) {
InvocableHandlerMethod handler = findHandlerForPayload(inboundPayload.getClass());
if (handler != null) {
return new InvocationResult(result, this.handlerSendTo.get(handler),
handler.getMethod().getGenericReturn... | public @Nullable Object fromMessage(Message<?> message, Class<?> targetClass) {
return null;
}
}, validator);
}
@Override
public void validate(Message<?> message, MethodParameter parameter, Object target) { // NOSONAR - public
super.validate(message, parameter, target);
}
}
} | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\listener\adapter\DelegatingInvocableHandler.java | 1 |
请完成以下Java代码 | public static void writePools(BpmnModel model, XMLStreamWriter xtw) throws Exception {
if (!model.getPools().isEmpty()) {
xtw.writeStartElement(BPMN2_PREFIX, ELEMENT_COLLABORATION, BPMN2_NAMESPACE);
xtw.writeAttribute(ATTRIBUTE_ID, "Collaboration");
for (Pool pool : model.get... | }
if (StringUtils.isNotEmpty(messageFlow.getSourceRef())) {
xtw.writeAttribute(ATTRIBUTE_FLOW_SOURCE_REF, messageFlow.getSourceRef());
}
if (StringUtils.isNotEmpty(messageFlow.getTargetRef())) {
xtw.writeAttribute(ATTRIBUTE_FLOW_TAR... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\export\CollaborationExport.java | 1 |
请完成以下Java代码 | public File exportToTempFile(@NonNull String fileNamePrefix)
{
final File file;
try
{
file = File.createTempFile(fileNamePrefix, "." + excelFormat.getFileExtension());
}
catch (final IOException ex)
{
throw new AdempiereException("Failed creating temporary excel file", ex);
}
exportToFile(file);... | final int displayType = -1; // N/A
final boolean functionRow = false;
return new CellStyleKey("header", column, displayType, functionRow);
}
public static CellStyleKey cell(final int column, final int displayType, final boolean functionRow)
{
return new CellStyleKey("cell", column, displayType, function... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\AbstractExcelExporter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CreatePDFCommand
{
private final IADPInstanceDAO adPInstanceDAO = Services.get(IADPInstanceDAO.class);
private final IADProcessDAO adProcessDAO = Services.get(IADProcessDAO.class);
@NonNull private final ImmutableList<PrintableQRCode> qrCodes;
@Nullable private final PInstanceId pInstanceId;
@NonNul... | .setAD_Process_ID(qrCodeProcessId)
.setPInstanceId(processPInstanceId)
.setJRDesiredOutputType(OutputType.PDF)
.build();
final ReportResult report = ReportsClient.get().report(reportProcessInfo);
return QRCodePDFResource.builder()
.data(report.getReportContent())
.filename(Optional.ofNullable(... | repos\metasfresh-new_dawn_uat\backend\de.metas.global_qrcode.services\src\main\java\de\metas\global_qrcodes\service\CreatePDFCommand.java | 2 |
请完成以下Java代码 | public Builder addStickyFilterSkipDuplicates(@Nullable final DocumentFilter stickyFilter)
{
if (stickyFilter == null)
{
return this;
}
if (_stickyFiltersById == null)
{
_stickyFiltersById = new LinkedHashMap<>();
}
final boolean notDuplicate = isNotDuplicateDocumentFilter(stickyFilter);... | if (notDuplicate)
{
_filtersById.putIfAbsent(filter.getFilterId(), filter);
}
});
return this;
}
public Builder refreshViewOnChangeEvents(final boolean refreshViewOnChangeEvents)
{
this.refreshViewOnChangeEvents = refreshViewOnChangeEvents;
return this;
}
private boolean isRefreshVi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\DefaultView.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Docket postsApi() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.urunov.controller"))
.paths(regex("/api/v1.*"))
.build()
.apiInfo(metaData());
}
private Ap... | .license("Apache License Version 2.0")
.licenseUrl("https://www.apache.org/licenses/LICENSE-2.0\"")
.contact(new Contact("Urunov Hamdamboy", "https://github.com/urunov/", "myindexu@gamil.com"))
.build();
}
@Override
protected void addResourceHandlers(ResourceH... | repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-1.SpringBoot-React-CRUD\fullstack\backendSwagger\src\main\java\com\urunov\configures\SwaggerConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void onNewSubscription(final @NonNull WebsocketSubscriptionId subscriptionId)
{
lastResultHolder.setValue(null);
}
@Override
public List<?> produceEvents()
{
final WorkflowLaunchersList newResult = computeNewResult();
final WorkflowLaunchersList previousResult = lastResultHolder.setValueAndReturnPrev... | .adLanguage(userBL.getUserLanguage(userId).getAD_Language())
.build();
}
private WorkflowLaunchersList computeNewResult()
{
final WorkflowLaunchersQuery query = queryTemplate.withMaxStaleAccepted(getMaxStaleAccepted());
return workflowRestAPIService.getLaunchers(query);
}
private Duration getMaxStaleAcce... | repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\controller\v2\ws\WorkflowLaunchersWebSocketProducer.java | 2 |
请完成以下Java代码 | private static ServerHttpRequest decorate(ServerWebExchange exchange, DataBuffer dataBuffer,
boolean cacheDecoratedRequest) {
if (dataBuffer.readableByteCount() > 0) {
if (log.isTraceEnabled()) {
log.trace("retaining body in exchange attribute");
}
Object cachedDataBuffer = exchange.getAttribute(CACH... | "Unable to handle DataBuffer of type " + dataBuffer.getClass());
}
}).flux();
}
};
if (cacheDecoratedRequest) {
exchange.getAttributes().put(CACHED_SERVER_HTTP_REQUEST_DECORATOR_ATTR, decorator);
}
return decorator;
}
/**
* One place to handle forwarding using DispatcherHandler. Allows for c... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\ServerWebExchangeUtils.java | 1 |
请完成以下Java代码 | public static List<Indexed<String>> getEvenIndexedStrings(List<String> names) {
List<Indexed<String>> list = StreamUtils.zipWithIndex(names.stream())
.filter(i -> i.getIndex() % 2 == 0)
.collect(Collectors.toList());
return list;
}
public static List<Indexed<String>> get... | .filter(tuple -> tuple._2 % 2 == 1)
.map(tuple -> tuple._1)
.toJavaList();
return oddIndexedNames;
}
public static List<String> getEvenIndexedStringsUsingAtomicInteger(String[] names) {
AtomicInteger index = new AtomicInteger(0);
return Arrays.stream(names)
... | repos\tutorials-master\core-java-modules\core-java-streams\src\main\java\com\baeldung\stream\StreamIndices.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean lwcEnabled() {
return obtain(AtlasProperties::isLwcEnabled, AtlasConfig.super::lwcEnabled);
}
@Override
public Duration lwcStep() {
return obtain(AtlasProperties::getLwcStep, AtlasConfig.super::lwcStep);
}
@Override
public boolean lwcIgnorePublishStep() {
return obtain(AtlasProperties::isLw... | @Override
public Duration configTTL() {
return obtain(AtlasProperties::getConfigTimeToLive, AtlasConfig.super::configTTL);
}
@Override
public String configUri() {
return obtain(AtlasProperties::getConfigUri, AtlasConfig.super::configUri);
}
@Override
public String evalUri() {
return obtain(AtlasPropertie... | 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 |
请在Spring Boot框架中完成以下Java代码 | public class OrderCountryModelAttributeSetInstanceListener implements IModelAttributeSetInstanceListener
{
private final OrderLineCountryModelAttributeSetInstanceListener orderLineListener = new OrderLineCountryModelAttributeSetInstanceListener();
private static final List<String> sourceColumnNames = Collections.sing... | }
@Override
public void modelChanged(final Object model)
{
final I_C_Order order = InterfaceWrapperHelper.create(model, I_C_Order.class);
for (final I_C_OrderLine line : Services.get(IOrderDAO.class).retrieveOrderLines(order))
{
orderLineListener.modelChanged(line);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\mm\attributes\countryattribute\impl\OrderCountryModelAttributeSetInstanceListener.java | 2 |
请完成以下Java代码 | protected boolean isEligibleForScheduling(final Object model)
{
//
// Check if *we* shall create the invoice candidates
final Properties ctx = extractCtxFromItem(model);
final String tableName = InterfaceWrapperHelper.getModelTableName(model);
final List<IInvoiceCandidateHandler> handlers = invoiceCand... | }
// services
private final transient IQueueDAO queueDAO = Services.get(IQueueDAO.class);
private final transient IInvoiceCandBL invoiceCandBL = Services.get(IInvoiceCandBL.class);
private final transient IInvoiceCandidateHandlerBL invoiceCandidateHandlerBL = Services.get(IInvoiceCandidateHandlerBL.class);
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\async\spi\impl\CreateMissingInvoiceCandidatesWorkpackageProcessor.java | 1 |
请完成以下Java代码 | public static <T> Appender<T> compose(Appender<T>... appenders) {
List<Appender<T>> resolvedAppenders = appenders != null
? Arrays.asList(appenders)
: Collections.emptyList();
return compose(resolvedAppenders);
}
/**
* Composes the {@link Iterable} of {@link Appender Appenders} into a {@link Composite... | protected Appender<T> getAppenderTwo() {
return this.two;
}
@Override
public void setContext(Context context) {
super.setContext(context);
getAppenderOne().setContext(context);
getAppenderTwo().setContext(context);
}
@Override
public Context getContext() {
Context context = super.getContext();
c... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-starters\spring-geode-starter-logging\src\main\java\org\springframework\geode\logging\slf4j\logback\CompositeAppender.java | 1 |
请完成以下Java代码 | public List<DmnHistoricDecisionExecution> findHistoricDecisionExecutionsByQueryCriteria(HistoricDecisionExecutionQueryImpl decisionExecutionQuery) {
return getDbSqlSession().selectList("selectHistoricDecisionExecutionsByQueryCriteria", decisionExecutionQuery, getManagedEntityClass());
}
@Override
p... | return (Long) getDbSqlSession().selectOne("selectHistoricDecisionExecutionCountByNativeQuery", parameterMap);
}
@Override
public void delete(HistoricDecisionExecutionQueryImpl query) {
getDbSqlSession().delete("bulkDeleteHistoricDecisionExecutions", query, getManagedEntityClass());
}
@Over... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\data\impl\MybatisHistoricDecisionExecutionDataManager.java | 1 |
请完成以下Java代码 | public void setValueDate (java.sql.Timestamp ValueDate)
{
set_Value (COLUMNNAME_ValueDate, ValueDate);
}
/** Get Datum.
@return Datum */
@Override
public java.sql.Timestamp getValueDate ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_ValueDate);
}
/** Set Zahlwert.
@param ValueNumber
Numeri... | public void setValueNumber (java.math.BigDecimal ValueNumber)
{
set_Value (COLUMNNAME_ValueNumber, ValueNumber);
}
/** Get Zahlwert.
@return Numeric Value
*/
@Override
public java.math.BigDecimal getValueNumber ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ValueNumber);
if (bd == null)
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeInstance.java | 1 |
请完成以下Java代码 | public class IncidentHandling {
public static Incident createIncident(String incidentType,
IncidentContext context,
String message) {
IncidentHandler handler = Context
.getProcessEngineConfiguration()
.getIncidentHandler(incidentType);
if (handler == null) {
handler = new D... | IncidentContext context,
boolean incidentsResolved) {
IncidentHandler handler = Context
.getProcessEngineConfiguration()
.getIncidentHandler(incidentType);
if (handler == null) {
handler = new DefaultIncidentHandler(incidentType);
}
if (incidentsResolved) {
handler.r... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\incident\IncidentHandling.java | 1 |
请完成以下Java代码 | private void changeFlatrateTermPrice(@NonNull final I_C_Flatrate_Term term, @NonNull final BigDecimal price)
{
term.setPriceActual(price);
InterfaceWrapperHelper.save(term);
invalidateInvoiceCandidatesOfFlatrateTerm(term);
}
private void changeFlatrateTermQty(@NonNull final I_C_Flatrate_Term term, @NonNull f... | private void changeQtyInSubscriptionProgressOfFlatrateTerm(@NonNull final I_C_Flatrate_Term term, @NonNull final BigDecimal qty)
{
final ISubscriptionDAO subscriptionPA = Services.get(ISubscriptionDAO.class);
final List<I_C_SubscriptionProgress> deliveries = subscriptionPA.retrieveSubscriptionProgresses(Subscript... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\ContractChangePriceQtyService.java | 1 |
请完成以下Java代码 | private String getSchemaPackageDirectory()
{
final String modelPackage = EntityTypesCache.instance.getModelPackage(p_EntityType);
Check.assumeNotEmpty(modelPackage, "Entity type " + p_EntityType + " has a ModelPackage set");
final int idx = modelPackage.indexOf(".model");
return modelPackage.substring(0, idx)... | final String entityType = System.getProperty(PARAM_EntityType);
if (Check.isEmpty(entityType, true))
{
throw new AdempiereException("Please set the EntityType");
}
LogManager.initialize(true); // just to make sure we are using the client side settings
AdempiereToolsHelper.getInstance().startupMinimal();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\esb\process\GenerateCanonicalXSD.java | 1 |
请完成以下Java代码 | public Purpose2CHCode getPurp() {
return purp;
}
/**
* Sets the value of the purp property.
*
* @param value
* allowed object is
* {@link Purpose2CHCode }
*
*/
public void setPurp(Purpose2CHCode value) {
this.purp = value;
}
/**
... | /**
* Gets the value of the rmtInf property.
*
* @return
* possible object is
* {@link RemittanceInformation5CH }
*
*/
public RemittanceInformation5CH getRmtInf() {
return rmtInf;
}
/**
* Sets the value of the rmtInf property.
*
* @pa... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\CreditTransferTransactionInformation10CH.java | 1 |
请完成以下Java代码 | public Set<PickingJobScheduleId> getJobScheduleIds()
{
return ids.stream()
.map(ShipmentScheduleAndJobScheduleId::getJobScheduleId)
.filter(Objects::nonNull)
.collect(ImmutableSet.toImmutableSet());
}
public Set<PickingJobScheduleId> getJobScheduleIds(final @NonNull ShipmentScheduleId shipmentSchedule... | map.forEach(consumer);
}
public ShipmentScheduleAndJobScheduleIdSet retainOnlyShipmentScheduleIds(@NonNull final Collection<ShipmentScheduleId> shipmentScheduleIds)
{
if (isEmpty()) {return this;}
Check.assumeNotEmpty(shipmentScheduleIds, "shipmentScheduleIds is not empty");
final ImmutableSet<ShipmentSched... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\picking\api\ShipmentScheduleAndJobScheduleIdSet.java | 1 |
请完成以下Java代码 | public class PortInUseException extends WebServerException {
private final int port;
/**
* Creates a new port in use exception for the given {@code port}.
* @param port the port that was in use
*/
public PortInUseException(int port) {
this(port, null);
}
/**
* Creates a new port in use exception for t... | * @param ex the source exception
* @param action the action to perform
* @since 2.2.7
*/
public static void ifPortBindingException(Exception ex, Consumer<BindException> action) {
ifCausedBy(ex, BindException.class, (bindException) -> {
// bind exception can be also thrown because an address can't be assigne... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\PortInUseException.java | 1 |
请完成以下Java代码 | class QueryOrderBy implements IQueryOrderBy
{
private final List<QueryOrderByItem> items;
private boolean sqlOrderByCompiled = false;
private String sqlOrderBy = null;
private Comparator<Object> comparator = null;
public QueryOrderBy(final List<QueryOrderByItem> items)
{
super();
if (items == null || items... | //
// Nulls First/Last
final Nulls nulls = item.getNulls();
if (nulls == Nulls.First)
{
sql.append(" NULLS FIRST");
}
else if (nulls == Nulls.Last)
{
sql.append(" NULLS LAST");
}
else
{
throw new IllegalStateException("Unknown NULLS option '" + nulls + "' for " + this);
}
}
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\QueryOrderBy.java | 1 |
请完成以下Java代码 | public void onUserLogin(final int adOrgRepoId, final int AD_Role_ID, final int AD_User_ID)
{
final Properties ctx = Env.getCtx();
final ClientId adClientId = Env.getClientId(ctx);
//
// Set default conversion type to context
if (adClientId.isRegular())
{
try
{
final OrgId adOrgId = OrgId.ofRepoI... | .sysConfigBL(sysConfigBL)
.factAcctLogService(factAcctLogService)
.build());
runInThread(FactAcctOpenItemsToUpdateDBTableWatcher.builder()
.sysConfigBL(sysConfigBL)
.faOpenItemsService(faOpenItemsService)
.build());
}
private void runInThread(@NonNull final Runnable watcher)
{
final Thread ... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\AcctModuleInterceptor.java | 1 |
请完成以下Java代码 | public @Nullable String getParameter(String name) {
String value = super.getParameter(name);
if (value != null) {
return value;
}
String[] values = this.savedRequest.getParameterValues(name);
if (values == null || values.length == 0) {
return null;
}
return values[0];
}
@Override
public Map<Stri... | if (savedRequestParams == null) {
return wrappedRequestParams;
}
if (wrappedRequestParams == null) {
return savedRequestParams;
}
// We have parameters in both saved and wrapped requests so have to merge them
List<String> wrappedParamsList = Arrays.asList(wrappedRequestParams);
List<String> combinedPa... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\savedrequest\SavedRequestAwareWrapper.java | 1 |
请完成以下Java代码 | public class GenericOrganisationIdentification1 {
@XmlElement(name = "Id", required = true)
protected String id;
@XmlElement(name = "SchmeNm")
protected OrganisationIdentificationSchemeName1Choice schmeNm;
@XmlElement(name = "Issr")
protected String issr;
/**
* Gets the value of the i... | public OrganisationIdentificationSchemeName1Choice getSchmeNm() {
return schmeNm;
}
/**
* Sets the value of the schmeNm property.
*
* @param value
* allowed object is
* {@link OrganisationIdentificationSchemeName1Choice }
*
*/
public void setSchmeNm(... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\GenericOrganisationIdentification1.java | 1 |
请完成以下Java代码 | public String getF_TAXORGCODE() {
return F_TAXORGCODE;
}
public void setF_TAXORGCODE(String f_TAXORGCODE) {
F_TAXORGCODE = f_TAXORGCODE;
}
public String getF_MEMO() {
return F_MEMO;
}
public void setF_MEMO(String f_MEMO) {
F_MEMO = f_MEMO;
}
public Str... | return F_END;
}
public void setF_END(String f_END) {
F_END = f_END;
}
public String getF_QRCANTONID() {
return F_QRCANTONID;
}
public void setF_QRCANTONID(String f_QRCANTONID) {
F_QRCANTONID = f_QRCANTONID;
}
public String getF_DECLARE() {
return F_DEC... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscCanton.java | 1 |
请完成以下Java代码 | public class X_MSV3_Server_Product_Category extends org.compiere.model.PO implements I_MSV3_Server_Product_Category, org.compiere.model.I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1186575449L;
/** Standard Constructor */
public X_MSV3_Server_Product_Category (Properties ctx, in... | */
@Override
public int getM_Product_Category_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Category_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set MSV3 Product_Category.
@param MSV3_Server_Product_Category_ID MSV3 Product_Category */
@Override
public void setMSV3_S... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java-gen\de\metas\vertical\pharma\msv3\server\model\X_MSV3_Server_Product_Category.java | 1 |
请完成以下Java代码 | public class OtherRealm extends AuthenticatingRealm {
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
log.info("OtherRealm doGetAuthenticationInfo");
UsernamePasswordToken userToken = (UsernamePasswordToken) token;
... | log.info("doGetAuthenticationInfo username: {}", username);
/**
* 见 {@link ShiroConfig#myRealm} 的密码指定算法
*/
return new SimpleAuthenticationInfo(principal, credentials, realmName);
}
public static void main(String[] args) {
String hashAlgorithmName = "SHA1";
Stri... | repos\spring-boot-quick-master\quick-shiro\src\main\java\com\shiro\quick\shiro\realm\OtherRealm.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class User {
private long id;
private String firstName;
private String lastName;
private String emailId;
private Date createdAt;
private String createdBy;
private Date updatedAt;
private String updatedby;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public long getId() {
return id;
}
pub... | }
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
@Column(name = "created_by", nullable = false)
@CreatedBy
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
@Column(name = "updated_at", nullable = fa... | repos\Spring-Boot-Advanced-Projects-main\spring-boot-crud-rest\src\main\java\com\alanbinu\springbootcrudrest\model\User.java | 2 |
请完成以下Java代码 | public void assertValidClientSoftwareId(final String clientSoftwareId)
{
// TODO implement
}
public void assertValidClientSoftwareId(final ClientSoftwareId clientSoftwareId)
{
// TODO implement
}
public BPartnerId getCurrentBPartner()
{
return getCurrentUser().getBpartnerId();
}
public MSV3User getCur... | countUpdated.incrementAndGet();
}
logger.debug("Updated/Deleted {} users", countUpdated);
}
//
// Delete
if (batchEvent.isDeleteAllOtherUsers())
{
final long countDeleted = usersRepo.deleteInBatchByMfSyncTokenNot(mfSyncToken);
logger.debug("Deleted {} users", countDeleted);
}
}
private void ... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\security\MSV3ServerAuthenticationService.java | 1 |
请完成以下Java代码 | public void setC_BPartner_Location_ID (int C_BPartner_Location_ID)
{
if (C_BPartner_Location_ID < 1)
set_Value (COLUMNNAME_C_BPartner_Location_ID, null);
else
set_Value (COLUMNNAME_C_BPartner_Location_ID, Integer.valueOf(C_BPartner_Location_ID));
}
/** Get Partner Location.
@return Identifies the (shi... | {
if (C_RecurrentPayment_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_RecurrentPayment_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_RecurrentPayment_ID, Integer.valueOf(C_RecurrentPayment_ID));
}
/** Get Recurrent Payment.
@return Recurrent Payment */
@Override
public int getC_RecurrentPayment_ID ()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\de\metas\banking\model\X_C_RecurrentPayment.java | 1 |
请完成以下Java代码 | public Builder setValueClass(final Class<?> valueClass)
{
this._valueClass = valueClass;
return this;
}
private Class<?> getValueClass()
{
if (_valueClass != null)
{
return _valueClass;
}
return getWidgetType().getValueClass();
}
public Builder setWidgetType(final DocumentFieldWidge... | return getValueClass();
}
public Builder setLookupDescriptor(@Nullable final LookupDescriptor lookupDescriptor)
{
this._lookupDescriptor = lookupDescriptor;
return this;
}
public OptionalBoolean getNumericKey()
{
return _numericKey;
}
public Builder setKeyColumn(final boolean keyColumn)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlDocumentFieldDataBindingDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CustomerOrderService implements OrderService {
public static final String EVENT_ORDER_READY_FOR_SHIPMENT = "OrderReadyForShipmentEvent";
private CustomerOrderRepository orderRepository;
private EventBus eventBus;
@Override
public void placeOrder(CustomerOrder order) {
this.ord... | }
@Override
public EventBus getEventBus() {
return eventBus;
}
public void setOrderRepository(CustomerOrderRepository orderRepository) {
this.orderRepository = orderRepository;
}
@Override
public void setEventBus(EventBus eventBus) {
this.eventBus = eventBus;
}... | repos\tutorials-master\patterns-modules\ddd-contexts\ddd-contexts-ordercontext\src\main\java\com\baeldung\dddcontexts\ordercontext\service\CustomerOrderService.java | 2 |
请完成以下Java代码 | public class GrpcServerMetricAutoConfiguration {
@GrpcGlobalServerInterceptor
@Order(InterceptorOrder.ORDER_TRACING_METRICS)
@ConditionalOnMissingBean
public MetricCollectingServerInterceptor metricCollectingServerInterceptor(final MeterRegistry registry,
final Collection<BindableService> s... | return new SimpleInfoContributor("grpc.server", details);
}
/**
* Gets all method names from the given service descriptor.
*
* @param serviceDescriptor The service descriptor to get the names from.
* @return The newly created and sorted list of the method names.
*/
protected List<S... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerMetricAutoConfiguration.java | 1 |
请完成以下Java代码 | public class SpringSecurityAuthenticationContext implements AuthenticationContext {
private static final Logger LOGGER = LoggerFactory.getLogger(SpringSecurityAuthenticationContext.class);
@Override
public String getAuthenticatedUserId() {
Authentication authentication = SecurityContextHolder.getC... | @Override
public void setPrincipal(Principal principal) {
if (principal == null) {
SecurityContextHolder.getContext().setAuthentication(null);
} else if (principal instanceof Authentication) {
SecurityContextHolder.getContext().setAuthentication((Authentication) principal);
... | repos\flowable-engine-main\modules\flowable-spring-security\src\main\java\org\flowable\spring\security\SpringSecurityAuthenticationContext.java | 1 |
请完成以下Java代码 | public String getSkipExpression() {
return skipExpression;
}
public void setSkipExpression(String skipExpression) {
this.skipExpression = skipExpression;
}
public boolean hasBoundaryErrorEvents() {
if (this.boundaryEvents != null && !this.boundaryEvents.isEmpty()) {
... | fieldExtensions = new ArrayList<FieldExtension>();
if (otherElement.getFieldExtensions() != null && !otherElement.getFieldExtensions().isEmpty()) {
for (FieldExtension extension : otherElement.getFieldExtensions()) {
fieldExtensions.add(extension.clone());
}
}
... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ServiceTask.java | 1 |
请完成以下Java代码 | public class DocumentPostMultiRequest implements Iterable<DocumentPostRequest>
{
private final ImmutableSet<DocumentPostRequest> requests;
private DocumentPostMultiRequest(@NonNull final ImmutableSet<DocumentPostRequest> requests)
{
Check.assumeNotEmpty(requests, "requests is not empty");
this.requests = reques... | }
public static Collector<DocumentPostRequest, ?, Optional<DocumentPostMultiRequest>> collect()
{
return GuavaCollectors.collectUsingListAccumulator(
list -> !list.isEmpty() ? Optional.of(ofNonEmptyCollection(list)) : Optional.empty()
);
}
public ImmutableSet<DocumentPostRequest> toSet() {return requests;... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\DocumentPostMultiRequest.java | 1 |
请完成以下Java代码 | private static double safeDivide(double x, double y)
{
if (y == 0)
return 0;
return x / y;
}
/**
* 获取一阶共现,其实就是词频统计
* @return
*/
public Set<Map.Entry<String, TermFrequency>> getUniGram()
{
return trieSingle.entrySet();
}
/**
* 获取二阶共现
... | // public static void main(String[] args)
// {
// Occurrence occurrence = new Occurrence();
// occurrence.addAll("算法工程师\n" +
// "算法(Algorithm)是一系列解决问题的清晰指令,也就是说,能够对一定规范的输入,在有限时间内获得所要求的输出。如果一个算法有缺陷,或不适合于某个问题,执行这个算法将不会解决这个问题。不同的算法可能用不同的时间、空间或效率来完成同样的任务。一个算法的优劣可以用空间复杂度与... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\occurrence\Occurrence.java | 1 |
请完成以下Java代码 | public void dispatchEvent(ActivitiEvent event) {
commandExecutor.execute(new DispatchEventCommand(event));
}
@Override
public void setProcessInstanceName(String processInstanceId, String name) {
commandExecutor.execute(new SetProcessInstanceNameCmd(processInstanceId, name));
}
@Ove... | }
@Override
public ProcessInstance startCreatedProcessInstance(
ProcessInstance createdProcessInstance,
Map<String, Object> variables
) {
return commandExecutor.execute(new StartCreatedProcessInstanceCmd<>(createdProcessInstance, variables));
}
public ProcessInstance startP... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\RuntimeServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BaseAutoDeployResourceContribution implements BeanFactoryInitializationAotContribution {
protected final ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
protected final Logger logger = LoggerFactory.getLogger(getClass());
protected final String locationPrefix;
... | }
protected ClassPathResource asClasspathResource(Resource resource) {
if (resource instanceof ClassPathResource) {
return (ClassPathResource) resource;
}
try {
logger.debug("Transforming {} to a classpath resource", resource);
String marker = "jar!";
... | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\aot\BaseAutoDeployResourceContribution.java | 2 |
请完成以下Java代码 | public MeterProvider<DistributionSummary> getReceivedMessageSizeDistribution() {
return this.receivedMessageSizeDistribution;
}
public MeterProvider<Timer> getServerCallDuration() {
return this.serverCallDuration;
}
public static Builder newBuilder() {
return new Builder();
... | public Builder setSentMessageSizeDistribution(MeterProvider<DistributionSummary> distribution) {
this.sentMessageSizeDistribution = distribution;
return this;
}
public Builder setReceivedMessageSizeDistribution(MeterProvider<DistributionSummary> distribution) {
this.... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\metrics\MetricsServerMeters.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SaveMode getSaveMode() {
return this.saveMode;
}
public void setSaveMode(SaveMode saveMode) {
this.saveMode = saveMode;
}
public @Nullable String getCleanupCron() {
return this.cleanupCron;
}
public void setCleanupCron(@Nullable String cleanupCron) {
this.cleanupCron = cleanupCron;
}
public C... | public enum ConfigureAction {
/**
* Ensure that Redis Keyspace events for Generic commands and Expired events are
* enabled.
*/
NOTIFY_KEYSPACE_EVENTS,
/**
* No not attempt to apply any custom Redis configuration.
*/
NONE
}
/**
* Type of Redis session repository to auto-configure.
*/
p... | repos\spring-boot-4.0.1\module\spring-boot-session-data-redis\src\main\java\org\springframework\boot\session\data\redis\autoconfigure\SessionDataRedisProperties.java | 2 |
请完成以下Spring Boot application配置 | logging.config=classpath:logback.xml
# the options from org.apache.camel.spring.boot.CamelConfigurationProperties can be configured here
camel.springboot.name=MyCamel
# lets listen on all ports to ensure we can be invoked from the pod IP
server.address=0.0.0.0
management.address=0.0.0.0
# lets use a different manage... | t.port=8081
# disable all management enpoints except health
endpoints.enabled = true
endpoints.health.enabled = true
spring.main.allow-bean-definition-overriding=true | repos\tutorials-master\messaging-modules\spring-apache-camel\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public int toInt()
{
return timing;
}
public boolean isDocAction(final String docAction)
{
return Objects.equals(this.docAction, docAction);
}
@VisibleForTesting
BeforeAfterType getBeforeAfter()
{
return beforeAfter;
}
public boolean isBefore()
{
return beforeAfter == BeforeAfterType.Before;
}
... | private static final Map<Integer, DocTimingType> timingInt2type = Stream.of(values()).collect(GuavaCollectors.toImmutableMapByKey(DocTimingType::toInt));
public static DocTimingType forAction(final String docAction, final BeforeAfterType beforeAfterType)
{
Check.assumeNotEmpty(docAction, "docAction not null");
C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\modelvalidator\DocTimingType.java | 1 |
请完成以下Java代码 | 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;
}
/** Set Service date.
@param ServiceDate
Date service was provided
*/
public void... | /** Set Quantity Provided.
@param ServiceLevelProvided
Quantity of service or product provided
*/
public void setServiceLevelProvided (BigDecimal ServiceLevelProvided)
{
set_ValueNoCheck (COLUMNNAME_ServiceLevelProvided, ServiceLevelProvided);
}
/** Get Quantity Provided.
@return Quantity of service or... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ServiceLevelLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void removeVariable(String variableName) {
throw new UnsupportedOperationException("Empty object, no variables can be removed");
}
@Override
public void removeVariableLocal(String variableName) {
throw new UnsupportedOperationException("Empty object, no variables can be removed");
... | @Override
public Map<String, Object> getTransientVariables() {
return null;
}
@Override
public void removeTransientVariableLocal(String variableName) {
throw new UnsupportedOperationException("Empty object, no variables can be removed");
}
@Override
public void removeTransi... | repos\flowable-engine-main\modules\flowable-variable-service-api\src\main\java\org\flowable\variable\api\delegate\EmptyVariableScope.java | 2 |
请完成以下Java代码 | public class AWindowListener extends WindowAdapter
{
/**
* Constructor
*
* @param win Window
* @param l Listener
*/
public AWindowListener (Window win, WindowStateListener l)
{
m_window = win;
m_listener = l;
win.addWindowListener(this);
} // AWindowListener | /** The Window */
private Window m_window;
/** The Listener */
private WindowStateListener m_listener;
/**
* Invoked when a window has been closed.
* Forwarded.
* @param e event to be forwarded
*/
public void windowClosed(WindowEvent e)
{
m_listener.windowStateChanged(e);
} // windowClos... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AWindowListener.java | 1 |
请完成以下Java代码 | public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setOrgValue (final @Nullable java.lang.String OrgValue)
{
set_Value (COLUMNNAME_OrgValue, OrgValue);
}
@Override
public java.lang.String getOrgValue()
{
return get_ValueAsString(COLUMNNAME_OrgValue)... | set_Value (COLUMNNAME_PostEncumbrance, PostEncumbrance);
}
@Override
public boolean isPostEncumbrance()
{
return get_ValueAsBoolean(COLUMNNAME_PostEncumbrance);
}
@Override
public void setPostStatistical (final boolean PostStatistical)
{
set_Value (COLUMNNAME_PostStatistical, PostStatistical);
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_ElementValue.java | 1 |
请完成以下Java代码 | private List<SpecificRelationTypeRelatedDocumentsProvider> retrieveRelatedDocumentsProviders(final ResultSet rs) throws SQLException
{
final ArrayList<SpecificRelationTypeRelatedDocumentsProvider> result = new ArrayList<>();
final Set<Integer> alreadySeen = new HashSet<>();
while (rs.next())
{
final int ad... | final ITranslatableString roleSourceDisplayName = roleSourceItem == null ? null : roleSourceItem.getName();
final ADRefListItem roleTargetItem = adReferenceService.retrieveListItemOrNull(X_AD_RelationType.ROLE_TARGET_AD_Reference_ID, relationType.getRole_Target());
final ITranslatableString roleTargetDisplayName =... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\related_documents\relation_type\RelationTypeRelatedDocumentsProvidersFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public LegacyEndpointConverter liquibaseLegacyEndpointConverter() {
return LegacyEndpointConverters.liquibase();
}
@Bean
@ConditionalOnMissingBean(name = "flywayLegacyEndpointConverter")
public LegacyEndpointConverter flywayLegacyEndpointConverter() {
return LegacyEndpointConverters.flyway();
}
@Bea... | @ConditionalOnMissingBean
public PerInstanceCookieStore cookieStore() {
return new JdkPerInstanceCookieStore(CookiePolicy.ACCEPT_ORIGINAL_SERVER);
}
/**
* Creates a default trigger to cleanup the cookie store on deregistering of an
* {@link de.codecentric.boot.admin.server.domain.entities.Instance}.
... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\config\AdminServerInstanceWebClientConfiguration.java | 2 |
请完成以下Java代码 | public boolean isAsyncAfter() {
return jobInstance.isAsyncAfter();
}
public boolean isAsyncBefore() {
return jobInstance.isAsyncBefore();
}
public MigratingJobInstance getJobInstance() {
return jobInstance;
}
@Override
public void setParent(MigratingScopeInstance parentInstance) {
if (p... | MigratingActivityInstance parentActivityInstance = (MigratingActivityInstance) parentInstance;
if (this.parentInstance != null) {
((MigratingActivityInstance) this.parentInstance).removeChild(this);
}
this.parentInstance = parentActivityInstance;
if (parentInstance != null) {
parentActivi... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingTransitionInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String slow(String name, int time) throws BlockException {
for (int i = 0; i < 10; i++) {
Thread timer = new Thread(new RunTask(name, time, true));
timer.setName("false");
timer.start();
}
return "successfully create a loop thread";
}
static cl... | } finally {
if (e1 != null) {
e1.exit();
}
}
Random random2 = new Random();
try {
TimeUnit.MILLISECONDS.sleep(random2.nextInt(200));
} catch (InterruptedException e) {
... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\controller\DemoController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Integer getPdfImageCache(String key) {
return pdfImagesCache.get(key);
}
@Override
public void putPdfImageCache(String pdfFilePath, int num) {
pdfImagesCache.put(pdfFilePath, num);
}
@Override
public Map<String, String> getMediaConvertCache() {
return mediaConver... | }
@Override
public void initIMGCachePool(Integer capacity) {
imgCache = new ConcurrentLinkedHashMap.Builder<String, List<String>>()
.maximumWeightedCapacity(capacity).weigher(Weighers.singleton())
.build();
}
@Override
public void initPdfImagesCachePool(Inte... | repos\kkFileView-master\server\src\main\java\cn\keking\service\cache\impl\CacheServiceJDKImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public OrderStateEnum getOrderStateEnum() {
return orderStateEnum;
}
public void setOrderStateEnum(OrderStateEnum orderStateEnum) {
this.orderState... | public Timestamp getTime() {
return time;
}
public void setTime(Timestamp time) {
this.time = time;
}
@Override
public String toString() {
return "OrderStateTimeEntity{" +
"orderId='" + orderId + '\'' +
", orderStateEnum=" + orderStateEnum +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\order\OrderStateTimeEntity.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void pushDailyReports(
final long bpartnerId,
final long productId,
final LocalDate dateFrom,
final LocalDate dateTo)
{
final List<ProductSupply> productSupplies = productSuppliesService.getProductSupplies(
bpartnerId,
productId,
dateFrom,
dateTo);
senderToMetasfreshService.pus... | senderToMetasfreshService.pushWeeklyReportsAsync(records);
}
@GetMapping("/pushActiveRfQs")
public void pushActiveRfQs(
@RequestHeader("apiKey") final String apiKey,
@RequestParam(name = "bpartnerId", required = false, defaultValue = "0") final long bpartnerId)
{
assertValidApiKey(apiKey);
final BPartne... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\rest\MetasfreshSyncRestController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static Map<String, Map<String, Object>> toMap() {
BankCodeEnum[] ary = BankCodeEnum.values();
Map<String, Map<String, Object>> enumMap = new HashMap<String, Map<String, Object>>();
for (int num = 0; num < ary.length; num++) {
Map<String, Object> map = new HashMap<String, Object>();
String key = ary[n... | /**
* 取枚举的json字符串
*
* @return
*/
public static String getJsonStr() {
BankCodeEnum[] enums = BankCodeEnum.values();
StringBuffer jsonStr = new StringBuffer("[");
for (BankCodeEnum senum : enums) {
if (!"[".equals(jsonStr.toString())) {
jsonStr.append(",");
}
jsonStr.append("{id:'").append(se... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\enums\BankCodeEnum.java | 2 |
请完成以下Java代码 | public void setM_PromotionGroup_ID (int M_PromotionGroup_ID)
{
if (M_PromotionGroup_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_PromotionGroup_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_PromotionGroup_ID, Integer.valueOf(M_PromotionGroup_ID));
}
/** Get Promotion Group.
@return Promotion Group */
pu... | public void setM_PromotionGroupLine_ID (int M_PromotionGroupLine_ID)
{
if (M_PromotionGroupLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_PromotionGroupLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_PromotionGroupLine_ID, Integer.valueOf(M_PromotionGroupLine_ID));
}
/** Get Promotion Group Line.
@re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionGroupLine.java | 1 |
请完成以下Java代码 | public Money percentage(@NonNull final Percent percent, @NonNull final Money input)
{
if (percent.isOneHundred())
{
return input;
}
final Currency currency = currencyRepository.getById(input.getCurrencyId());
final BigDecimal newValue = percent
.computePercentageOf(input.toBigDecimal(), currency.get... | public Amount toAmount(@NonNull final BigDecimal value, @NonNull final CurrencyId currencyId)
{
final CurrencyCode currencyCode = currencyRepository.getCurrencyCodeById(currencyId);
return Amount.of(value, currencyCode);
}
public Money toMoney(@NonNull final Amount amount)
{
final CurrencyId currencyId = cur... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\money\MoneyService.java | 1 |
请完成以下Java代码 | public RootPropertyResolver getRootPropertyResolver() {
return root;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
return delegate.getCommonPropertyType(context, base);
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(EL... | return delegate.getValue(context, base, property);
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
return delegate.isReadOnly(context, base, property);
}
@Override
public void setValue(ELContext context, Object base, Object property, Object valu... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\util\SimpleResolver.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void updateCUPickAttributes(@NonNull final TUPart cu, @NonNull final PickAttributes pickAttributes)
{
updateHUPickAttributes(cu.toHU(), pickAttributes, false);
}
private void updateHUPickAttributes(@NonNull final I_M_HU hu, @NonNull final PickAttributes pickAttributes, final boolean recomputeFromChildren)... | {
final HashSet<LocalDate> childValues = new HashSet<>();
for (final IAttributeStorage childAttributes : huAttributes.getChildAttributeStorages(true))
{
if (childAttributes.hasAttribute(attributeCode))
{
childValues.add(childAttributes.getValueAsLocalDate(attributeCode));
}
}
return childValues.... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\pick\PickedHUAttributesUpdater.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected void applyToResource(ClassPathResource resource, RuntimeHints hints) {
hints.resources().registerResource(resource);
}
protected ClassPathResource asClasspathResource(Resource resource) {
if (resource instanceof ClassPathResource) {
return (ClassPathResource) resource;
... | var locationOfClassesInUrl = externalFormOfUrl.indexOf(classesSubstring);
if (locationOfClassesInUrl != -1) {
return new ClassPathResource(externalFormOfUrl.substring(locationOfClassesInUrl + classesSubstring.length()));
}
}
logger.error("Cou... | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\aot\BaseAutoDeployResourceContribution.java | 2 |
请完成以下Java代码 | private void handleChangeEvent(RecordChangeEvent<SourceRecord> sourceRecordRecordChangeEvent) {
SourceRecord sourceRecord = sourceRecordRecordChangeEvent.record();
log.info("Key = {}, Value = {}", sourceRecord.key(), sourceRecord.value());
Object sourceRecordChangeValue= (Struct) sourceRecord.va... | // // this.customerService.replicateData(payload, operation);
// log.info("Updated Data: {} with Operation: {}", payload, operation.name());
// }
// }
}
@PostConstruct
private void start() {
this.executor.execute(debeziumEngine);
}
@PreDestroy
... | repos\springboot-demo-master\postgre\src\main\java\com\et\postgres\listener\DebeziumListener.java | 1 |
请完成以下Java代码 | public void setSalesRep_Name (final @Nullable java.lang.String SalesRep_Name)
{
set_Value (COLUMNNAME_SalesRep_Name, SalesRep_Name);
}
@Override
public java.lang.String getSalesRep_Name()
{
return get_ValueAsString(COLUMNNAME_SalesRep_Name);
}
@Override
public void setTaxID (final @Nullable java.lang.Str... | @Override
public void setWarehouse_Location(final org.compiere.model.I_C_Location Warehouse_Location)
{
set_ValueFromPO(COLUMNNAME_Warehouse_Location_ID, org.compiere.model.I_C_Location.class, Warehouse_Location);
}
@Override
public void setWarehouse_Location_ID (final int Warehouse_Location_ID)
{
if (Wareho... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Header_v.java | 1 |
请完成以下Java代码 | public static boolean isInstance(@NonNull final CommissionConfig config)
{
return config instanceof MarginConfig;
}
@NonNull
public static MarginConfig cast(@NonNull final CommissionConfig config)
{
return castOrEmpty(config)
.orElseThrow(() -> new AdempiereException("Cannot cast the given config to Margi... | {
this.commissionProductId = commissionProductId;
this.tradedPercent = tradedPercent;
this.pointsPrecision = pointsPrecision;
this.marginContract = marginContract;
this.customerTradeMarginLineId = customerTradeMarginLineId;
}
@Override
public CommissionType getCommissionType()
{
return CommissionType.M... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\margin\MarginConfig.java | 1 |
请完成以下Java代码 | public String getTenantId() {
return tenantId;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public Date getRemovalTime() {
return removalTime;
}
public void setRemovalTime(Date removalTime) {
this.removalTime = removalTim... | dto.processDefinitionVersion = historicProcessInstance.getProcessDefinitionVersion();
dto.startTime = historicProcessInstance.getStartTime();
dto.endTime = historicProcessInstance.getEndTime();
dto.removalTime = historicProcessInstance.getRemovalTime();
dto.durationInMillis = historicProcessInstance.get... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricProcessInstanceDto.java | 1 |
请完成以下Java代码 | protected IDocumentLUTUConfigurationManager createReceiptLUTUConfigurationManager()
{
final I_PP_Order_BOMLine coByProductOrderBOMLine = getCoByProductOrderBOMLine();
return huPPOrderBL.createReceiptLUTUConfigurationManager(coByProductOrderBOMLine);
}
@Override
protected ReceiptCandidateRequestProducer newRece... | .build();
}
@Override
protected void addAssignedHUs(final Collection<I_M_HU> hus)
{
final I_PP_Order_BOMLine bomLine = getCoByProductOrderBOMLine();
huPPOrderBL.addAssignedHandlingUnits(bomLine, hus);
}
@Override
public IPPOrderReceiptHUProducer withPPOrderLocatorId()
{
final I_PP_Order order = huPPOrde... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\CostCollectorCandidateCoProductHUProducer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static long getOrDefault(long ts) {
return ts > 0 ? ts : System.currentTimeMillis();
}
private void addSystemAlarmComment(Alarm alarm, User user, AlarmCommentSubType subType, String param, String value) {
Map<String, String> params = new LinkedHashMap<>(1);
params.put(param, val... | .put("subtype", subType.name());
params.forEach(commentNode::put);
AlarmComment alarmComment = AlarmComment.builder()
.alarmId(alarm.getId())
.type(AlarmCommentType.SYSTEM)
.comment(commentNode)
.build();
try {
alarmComm... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\alarm\DefaultTbAlarmService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class OrderLineAllocADRModelAttributeSetInstanceListener implements IModelAttributeSetInstanceListener
{
@Override
public @NonNull String getSourceTableName()
{
return I_C_Order_Line_Alloc.Table_Name;
}
@Override
public List<String> getSourceColumnNames()
{
return Collections.emptyList();
}
/**
... | .setSourceModel(orderLine)
.setForceApplyForSOTrx(forceApply)
.updateASI();
}
@SuppressWarnings("unused")
private boolean isEDIInput(final I_C_Order_Line_Alloc alloc)
{
// Services
final IEDIOLCandBL ediOLCandBL = Services.get(IEDIOLCandBL.class);
final I_C_OLCand olCand = alloc.getC_OLCand();
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\org\adempiere\mm\attributes\listeners\adr\OrderLineAllocADRModelAttributeSetInstanceListener.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class AppOrderPollingApplication {
private static final Log LOG = LogFactory.getLog(AppOrderPollingApplication.class);
public static DelayQueue<PollingTask> tasks = new DelayQueue<PollingTask>();
@Autowired
private ThreadPoolTaskExecutor threadPool;
@Autowired
public PollingPersist pol... | cacheThreadPool.execute(new Runnable() {
public void run() {
try {
while (true) {
Thread.sleep(100);
LOG.info("==>threadPool.getActiveCount():" + cacheThreadPool.getActiveCount());
LOG.info("==>thread... | repos\roncoo-pay-master\roncoo-pay-app-order-polling\src\main\java\com\roncoo\pay\AppOrderPollingApplication.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.