instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | private static Optional<String> getJsonExportDirectorySettings(@NonNull final ExternalSystemGRSSignumConfig grsSignumConfig)
{
if (!grsSignumConfig.isCreateBPartnerFolders())
{
return Optional.empty();
}
if (Check.isBlank(grsSignumConfig.getBPartnerExportDirectories()) || Check.isBlank(grsSignumConfig.getB... | final JsonExportDirectorySettings exportDirectorySettings = JsonExportDirectorySettings.builder()
.basePath(grsSignumConfig.getBasePathForExportDirectories())
.directories(directories)
.build();
try
{
final String serializedExportDirectorySettings = JsonObjectMapperHolder.sharedJsonObjectMapper()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\grssignum\ExportBPartnerToGRSService.java | 1 |
请完成以下Java代码 | public void sendSimpleMessageUsingTemplate(String to,
String subject,
String ...templateModel) {
String text = String.format(template.getText(), templateModel);
sendSimpleMessage(to, subject, text);
}
... | String htmlBody = thymeleafTemplateEngine.process("template-thymeleaf.html", thymeleafContext);
sendHtmlMessage(to, subject, htmlBody);
}
@Override
public void sendMessageUsingFreemarkerTemplate(
String to, String subject, Map<String, Object> templateModel)
throws IOException, ... | repos\tutorials-master\spring-web-modules\spring-mvc-basics-2\src\main\java\com\baeldung\spring\mail\EmailServiceImpl.java | 1 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Time based.
@param IsTimeBased ... | }
/** Get Number of Months.
@return Number of Months */
public int getNoMonths ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_NoMonths);
if (ii == null)
return 0;
return ii.intValue();
}
/** RecognitionFrequency AD_Reference_ID=196 */
public static final int RECOGNITIONFREQUENCY_AD_Reference_ID=... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RevenueRecognition.java | 1 |
请完成以下Java代码 | public String getContentText ()
{
return (String)get_Value(COLUMNNAME_ContentText);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@ret... | public static final String MEDIATYPE_ImageGif = "GIF";
/** image/jpeg = JPG */
public static final String MEDIATYPE_ImageJpeg = "JPG";
/** image/png = PNG */
public static final String MEDIATYPE_ImagePng = "PNG";
/** application/pdf = PDF */
public static final String MEDIATYPE_ApplicationPdf = "PDF";
/** text/c... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Media.java | 1 |
请完成以下Java代码 | public ParsedDeployment build() {
List<ProcessDefinitionEntity> processDefinitions = new ArrayList<>();
Map<ProcessDefinitionEntity, BpmnParse> processDefinitionsToBpmnParseMap = new LinkedHashMap<>();
Map<ProcessDefinitionEntity, EngineResource> processDefinitionsToResourceMap = new LinkedHashM... | } else {
// On redeploy, we assume it is validated at the first deploy
bpmnParse.setValidateSchema(false);
bpmnParse.setValidateProcess(false);
}
try {
bpmnParse.execute();
} catch (Exception e) {
LOGGER.error("Could not parse resource... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\deployer\ParsedDeploymentBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Application {
private static Logger logger = LoggerFactory.getLogger(Application.class);
public static void main(String[] args) throws Exception {
ConfigurableApplicationContext context = SpringApplication.run(Application.class, args);
JmsTemplate jmsTemplate = context.getBean(Jms... | @Bean // Serialize message content to json using TextMessage
public MessageConverter jacksonJmsMessageConverter() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
... | repos\Spring-Boot-Advanced-Projects-main\springboot2-jms-activemq\src\main\java\net\alanbinu\springboot\Application.java | 2 |
请完成以下Java代码 | public class Division implements CalculatorOperation {
private double left;
private double right;
private double result = 0.0;
public Division(double left, double right) {
this.left = left;
this.right = right;
}
public double getLeft() {
return left;
}
public void setLeft(double left) {
this.left = l... | }
public void setRight(double right) {
this.right = right;
}
public double getResult() {
return result;
}
public void setResult(double result) {
this.result = result;
}
@Override
public void perform() {
if (right != 0) {
result = left / right;
}
}
} | repos\tutorials-master\patterns-modules\solid\src\main\java\com\baeldung\o\Division.java | 1 |
请完成以下Java代码 | public RetourenAnteilTypType getRetourenAnteilTyp() {
return retourenAnteilTyp;
}
/**
* Sets the value of the retourenAnteilTyp property.
*
* @param value
* allowed object is
* {@link RetourenAnteilTypType }
*
*/
... | * <complexType>
* <complexContent>
* <extension base="{urn:msv3:v2}RetourePositionType">
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAcce... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourenavisAnkuendigungAntwort.java | 1 |
请完成以下Java代码 | private String getRequestBody(@NonNull final CachedBodyHttpServletRequest requestWrapper)
{
try
{
final ObjectMapper objectMapper = JsonObjectMapperHolder.sharedJsonObjectMapper();
if (requestWrapper.getContentLength() <= 0)
{
return null;
}
final Object body = objectMapper.readValue(requestWr... | {
if (obj == null)
{
return null;
}
try
{
return JsonObjectMapperHolder.sharedJsonObjectMapper().writeValueAsString(obj);
}
catch (final JsonProcessingException e)
{
throw new AdempiereException("Failed to parse object!", e);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\dto\ApiRequestMapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DmnDeploymentBuilder parentDeploymentId(String parentDeploymentId) {
deployment.setParentDeploymentId(parentDeploymentId);
return this;
}
@Override
public DmnDeploymentBuilder enableDuplicateFiltering() {
isDuplicateFilterEnabled = true;
return this;
}
@Overr... | // getters and setters
// //////////////////////////////////////////////////////
public DmnDeploymentEntity getDeployment() {
return deployment;
}
public boolean isDmnXsdValidationEnabled() {
return isDmn20XsdValidationEnabled;
}
public boolean isDuplicateFilterEnabled() {
... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\repository\DmnDeploymentBuilderImpl.java | 2 |
请完成以下Java代码 | public int getPP_Order_ProductAttribute_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ProductAttribute_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Suchschlüssel.
@param Value
Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Overrid... | }
/** Set Zahlwert.
@param ValueNumber
Numeric Value
*/
@Override
public void setValueNumber (java.math.BigDecimal ValueNumber)
{
set_Value (COLUMNNAME_ValueNumber, ValueNumber);
}
/** Get Zahlwert.
@return Numeric Value
*/
@Override
public java.math.BigDecimal getValueNumber ()
{
BigDecima... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_ProductAttribute.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getCategory() {
return category;
}
public String getDescription() {
return description;
}
public String getName() {
return name;
}
public int getVersion() {
return version;
}
public String getResource() {
return resource;
}
public String getDeploymentId() {
... | }
public Integer getHistoryTimeToLive() {
return historyTimeToLive;
}
public boolean isStartableInTasklist() {
return isStartableInTasklist;
}
public static ProcessDefinitionDto fromProcessDefinition(ProcessDefinition definition) {
ProcessDefinitionDto dto = new ProcessDefinitionDto();
dto.... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\ProcessDefinitionDto.java | 2 |
请完成以下Java代码 | protected final void pickQtyToNewHUs(@NonNull final Consumer<Quantity> pickQtyConsumer)
{
Quantity qtyToPack = getQtyToPack();
if (qtyToPack.signum() <= 0)
{
throw new AdempiereException("@QtyCU@ > 0");
}
final Capacity piipCapacity = getPIIPCapacity();
if (piipCapacity.isInfiniteCapacity())
{
pi... | .orElseThrow(() -> new AdempiereException("QtyTU cannot be obtained for the current request!")
.appendParametersToMessage()
.setParameter("QtyCU", qtyCUsPerTU)
.setParameter("ShipmentScheduleId", getCurrentShipmentScheduleId()));
}
@NonNull
protected final Capacity getPIIPCapacity()
{
final I_M... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_PickQtyToComputedHU.java | 1 |
请完成以下Java代码 | private static ImmutableSet<RecordAccessId> extractIds(final Collection<I_AD_User_Record_Access> accessRecords)
{
return accessRecords.stream()
.map(RecordAccessService::extractId)
.collect(ImmutableSet.toImmutableSet());
}
private static RecordAccessId extractId(final I_AD_User_Record_Access record)
{
... | return configs
.getByRoleId(roleId)
.isTableHandled(tableName);
}
public boolean hasRecordPermission(
@NonNull final UserId userId,
@NonNull final RoleId roleId,
@NonNull final TableRecordReference recordRef,
@NonNull final Access permission)
{
if (!isApplyUserGroupRecordAccess(roleId, recordR... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\record_access\RecordAccessService.java | 1 |
请完成以下Java代码 | public final Object getEmptyValue()
{
final Object value = getValue();
if (value == null)
{
return null;
}
if (value instanceof BigDecimal)
{
return BigDecimal.ZERO;
}
else if (value instanceof String)
{
return null;
}
else if (TimeUtil.isDateOrTimeObject(value))
{
return null;
}... | return null;
}
}
private IAttributeValueCallout _attributeValueCallout = null;
@Override
public IAttributeValueCallout getAttributeValueCallout()
{
if (_attributeValueCallout == null)
{
final IAttributeValueGenerator attributeValueGenerator = getAttributeValueGeneratorOrNull();
if (attributeValueGene... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\AbstractAttributeValue.java | 1 |
请完成以下Java代码 | public Integer getOrderCount() {
return orderCount;
}
public void setOrderCount(Integer orderCount) {
this.orderCount = orderCount;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getNote() {
... | public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id)... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsHomeAdvertise.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getProcessInstanceId() {
return processInstanceId;
}
@Override
public String getProcessDefinitionId() {
return processDefinitionId;
}
@Override
public String getScopeId() {
return scopeId;
}
@Override
public String getScopeDefinitionId() {
... | return subScopeId;
}
@Override
public String getScopeType() {
return scopeType;
}
@Override
public String getTenantId() {
return tenantId;
}
@Override
public void create() {
// add is not supported by default
throw new RuntimeException("Operation is... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\BaseHistoricTaskLogEntryBuilderImpl.java | 2 |
请完成以下Java代码 | void fillTransient() {
if (priorityValue > 0) {
this.priority = Priority.of(priorityValue);
}
}
@PrePersist
void fillPersistent() {
if (priority != null) {
this.priorityValue = priority.getPriority();
}
}
public int getId() {
return i... | }
public void setStatus(Status status) {
this.status = status;
}
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
public Priority getPriority() {
return priority;
}
public void setPriority(Priority priori... | repos\tutorials-master\persistence-modules\java-jpa\src\main\java\com\baeldung\jpa\enums\Article.java | 1 |
请完成以下Java代码 | public String getRestartedProcessInstanceId() {
return restartedProcessInstanceId;
}
public void setRestartedProcessInstanceId(String restartedProcessInstanceId) {
this.restartedProcessInstanceId = restartedProcessInstanceId;
}
@Override
public String toString() {
return this.getClass().getS... | + ", endTime=" + endTime
+ ", removalTime=" + removalTime
+ ", endActivityId=" + endActivityId
+ ", startActivityId=" + startActivityId
+ ", id=" + id
+ ", eventType=" + eventType
+ ", executionId=" + executionId
+ ", processDefinitionId=" + p... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricProcessInstanceEventEntity.java | 1 |
请完成以下Java代码 | public ConditionExpression getCondition() {
return conditionChild.getChild(this);
}
public void setCondition(ConditionExpression expression) {
conditionChild.setChild(this, expression);
}
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilde... | nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME)
.build();
contextRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_CONTEXT_REF)
.idAttributeReference(CaseFileItem.class)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
conditionChild = s... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ApplicabilityRuleImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public NotificationSettings getNotificationSettings(@AuthenticationPrincipal SecurityUser user) throws ThingsboardException {
accessControlService.checkPermission(user, Resource.ADMIN_SETTINGS, Operation.READ);
TenantId tenantId = user.isSystemAdmin() ? TenantId.SYS_TENANT_ID : user.getTenantId();
... | @PostMapping("/notification/settings/user")
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN', 'CUSTOMER_USER')")
public UserNotificationSettings saveUserNotificationSettings(@RequestBody @Valid UserNotificationSettings settings,
@Authent... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\NotificationController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public DataSource eventsDataSource(@Qualifier("eventsDataSourceProperties") DataSourceProperties eventsDataSourceProperties) {
return eventsDataSourceProperties.initializeDataSourceBuilder().type(HikariDataSource.class).build();
}
@Bean
public LocalContainerEntityManagerFactoryBean eventsEntityMana... | public JpaTransactionManager eventsTransactionManager(@Qualifier("eventsEntityManagerFactory") LocalContainerEntityManagerFactoryBean eventsEntityManagerFactory) {
return new JpaTransactionManager(Objects.requireNonNull(eventsEntityManagerFactory.getObject()));
}
@Bean(EVENTS_TRANSACTION_TEMPLATE)
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\config\DedicatedEventsJpaDaoConfig.java | 2 |
请完成以下Java代码 | private int getPageLength()
{
return pageLength;
}
public static SqlComposedKey extractComposedKey(
final DocumentId recordId,
final List<? extends SqlEntityFieldBinding> keyFields)
{
final int count = keyFields.size();
if (count < 1)
{
throw new AdempiereException("Invalid composed key: " + keyFi... | final Object valueObj = composedKeyParts.get(i);
@Nullable final Object valueConv = DataTypes.convertToValueClass(
keyColumnName,
valueObj,
keyField.getWidgetType(),
keyField.getSqlValueClass(),
null);
if (!JSONNullValue.isNull(valueConv))
{
values.put(keyColumnName, valueConv);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlDocumentQueryBuilder.java | 1 |
请完成以下Java代码 | public final int executeUpdate() throws SQLException
{
return trace(() -> delegate.executeUpdate());
}
@Override
public final void clearParameters() throws SQLException
{
delegate.clearParameters();
}
@Override
public final boolean execute() throws SQLException
{
return trace(() -> delegate.execute());... | delegate.addBatch();
return null;
});
}
@Override
public final ResultSetMetaData getMetaData() throws SQLException
{
return delegate.getMetaData();
}
@Override
public final ParameterMetaData getParameterMetaData() throws SQLException
{
return delegate.getParameterMetaData();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\sql\impl\TracingPreparedStatement.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PurchaseCandidateReminderSchedulerRestController
{
public static final String ENDPOINT = WebConfig.ENDPOINT_ROOT + "/purchaseCandidates/reminders";
@Autowired
private PurchaseCandidateReminderScheduler reminderScheduler;
@Autowired
private UserSession userSession;
private void assertAuth()
{
use... | }
@PostMapping
public synchronized void addReminder(@RequestBody final PurchaseCandidateReminder reminder)
{
assertAuth();
reminderScheduler.scheduleNotification(reminder);
}
@GetMapping("/nextDispatchTime")
public ZonedDateTime getNextDispatchTime()
{
assertAuth();
return reminderScheduler.getNextDi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\purchasecandidate\reminder\PurchaseCandidateReminderSchedulerRestController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public AuthenticationManager authenticationManagerBean() throws Exception {
return super.authenticationManagerBean();
}
@Override
@Bean(name = BeanIds.USER_DETAILS_SERVICE)
public UserDetailsService userDetailsServiceBean() throws Exception {
return super.userDetailsServiceBean();
}... | // 不使用 PasswordEncoder 密码编码器
.passwordEncoder(passwordEncoder())
// 配置 yunai 用户
.withUser("yunai").password("1024").roles("USER");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.author... | repos\SpringBoot-Labs-master\lab-68-spring-security-oauth\lab-68-demo03-authorization-server-with-resource-owner-password-credentials\src\main\java\cn\iocoder\springboot\lab68\authorizationserverdemo\config\SecurityConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public abstract class OtpBasedTwoFaProvider<C extends OtpBasedTwoFaProviderConfig, A extends OtpBasedTwoFaAccountConfig> implements TwoFaProvider<C, A> {
private final Cache verificationCodesCache;
protected OtpBasedTwoFaProvider(CacheManager cacheManager) {
this.verificationCodesCache = cacheManager.... | }
if (code.equals(correctVerificationCode.getValue())
&& accountConfig.equals(correctVerificationCode.getAccountConfig())) {
verificationCodesCache.evict(user.getId());
return true;
}
}
return false;
}
@Data
public... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\mfa\provider\impl\OtpBasedTwoFaProvider.java | 2 |
请完成以下Java代码 | public Map<String, Object> getTaskLocalVariables() {
return activiti5Task.getTaskLocalVariables();
}
@Override
public Map<String, Object> getProcessVariables() {
return activiti5Task.getProcessVariables();
}
@Override
public Map<String, Object> getCaseVariables() {
retu... | public void setDelegationState(DelegationState delegationState) {
activiti5Task.setDelegationState(delegationState);
}
@Override
public void setDueDate(Date dueDate) {
activiti5Task.setDueDate(dueDate);
}
@Override
public void setCategory(String category) {
activiti5Tas... | repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5TaskWrapper.java | 1 |
请完成以下Java代码 | public boolean acquireLock() {
return acquireLock(lockForceAcquireAfter);
}
@Override
public boolean acquireLock(Duration lockForceAcquireAfter) {
if (hasAcquiredLock) {
return true;
}
try {
hasAcquiredLock = executeCommand(new LockCmd(lockName, lock... | public void releaseAndDeleteLock() {
executeCommand(new ReleaseLockCmd(lockName, engineType, true));
LOGGER.debug("successfully released and deleted lock {}", lockName);
hasAcquiredLock = false;
}
@Override
public <T> T waitForLockRunAndRelease(Duration waitTime, Supplier<T> supplie... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\lock\LockManagerImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | void init() {
jdbcTemplate.setResultsMapCaseInsensitive(true);
}
public void fetchAnthologyAuthors() {
SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)
.withProcedureName("FETCH_AUTHOR_BY_GENRE");
List<Author> authors = simpleJdbcCall.execute(Map.of("p_g... | System.out.println("Result: " + authors);
}
public static Author fetchAuthor(Map<String, Object> data) {
Author author = new Author();
author.setId((Long) data.get("id"));
author.setName((String) data.get("name"));
author.setGenre((String) data.get("genre"));
author.se... | repos\Hibernate-SpringBoot-master\HibernateSpringBootCallStoredProcedureJdbcTemplate\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void mapTemplateProperties(Template properties, JmsTemplate template) {
PropertyMapper map = PropertyMapper.get();
map.from(properties.getSession().getAcknowledgeMode()::getMode).to(template::setSessionAcknowledgeMode);
map.from(properties.getSession()::isTransacted).to(template::setSessionTransacted);... | return messagingTemplate;
}
private void mapTemplateProperties(Template properties, JmsMessagingTemplate messagingTemplate) {
PropertyMapper map = PropertyMapper.get();
map.from(properties::getDefaultDestination).to(messagingTemplate::setDefaultDestinationName);
}
}
@Configuration(proxyBeanMethods = fa... | repos\spring-boot-4.0.1\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\JmsClientConfigurations.java | 2 |
请完成以下Java代码 | public void launchDailySettCollect(List<RpAccount> accountList, Date endDate) {
if (accountList == null || accountList.isEmpty()) {
return;
}
// 单商户发起结算
for (RpAccount rpAccount : accountList) {
try {
LOG.debug(rpAccount.getUserNo() + ":开始汇总");
dailySettCollectBiz.dailySettCollect(rpAccount, endD... | if (accountList == null || accountList.isEmpty()) {
return;
}
// 单商户发起结算
for (RpAccount rpAccount : accountList) {
try {
RpUserPayConfig rpUserPayConfig = rpUserPayConfigService.getByUserNo(rpAccount.getUserNo());
if (rpUserPayConfig == null) {
LOG.info(rpAccount.getUserNo() + "没有商家设置信息,不进行结算")... | repos\roncoo-pay-master\roncoo-pay-app-settlement\src\main\java\com\roncoo\pay\app\settlement\biz\SettBiz.java | 1 |
请完成以下Java代码 | public static long getDaysBetween360(@NonNull final ZonedDateTime from, @NonNull final ZonedDateTime to)
{
if (from.isEqual(to))
{
return 0;
}
if (to.isBefore(from))
{
return getDaysBetween360(to, from) * -1;
}
ZonedDateTime dayFrom = from;
ZonedDateTime dayTo = to;
if (dayFrom.getDayOfMonth()... | return 30 * months + daysLeft;
}
/**
* Compute the days between two dates as if each year is 360 days long.
* More details and an implementation for Excel can be found in {@link org.apache.poi.ss.formula.functions.Days360}
*/
public static long getDaysBetween360(@NonNull final Instant from, @NonNull final Ins... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\TimeUtil.java | 1 |
请完成以下Java代码 | public class RuleNodeDebugEventEntity extends EventEntity<RuleNodeDebugEvent> implements BaseEntity<RuleNodeDebugEvent> {
@Column(name = EVENT_TYPE_COLUMN_NAME)
private String eventType;
@Column(name = EVENT_ENTITY_ID_COLUMN_NAME)
private UUID eventEntityId;
@Column(name = EVENT_ENTITY_TYPE_COLUMN_... | this.relationType = event.getRelationType();
this.data = event.getData();
this.metadata = event.getMetadata();
this.error = event.getError();
}
@Override
public RuleNodeDebugEvent toData() {
var builder = RuleNodeDebugEvent.builder()
.tenantId(TenantId.fromUU... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\RuleNodeDebugEventEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getTypeOfPackaging() {
return typeOfPackaging;
}
/**
* Sets the value of the typeOfPackaging property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTypeOfPackaging(String value) {
this.typeOfPackagi... | * {@link UnitType }
*
*/
public UnitType getGrossVolume() {
return grossVolume;
}
/**
* Sets the value of the grossVolume property.
*
* @param value
* allowed object is
* {@link UnitType }
*
*/
public void setGrossVolume(UnitTy... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\PackagingInformationType.java | 2 |
请完成以下Java代码 | public void complete(String externalTaskId, Map<String, Object> variables, Map<String, Object> localVariables) {
try {
engineClient.complete(externalTaskId, variables, localVariables);
} catch (EngineClientException e) {
throw LOG.handledEngineClientException("completing the external task", e);
... | }
@Override
public void handleBpmnError(String externalTaskId, String errorCode, String errorMessage, Map<String, Object> variables) {
try {
engineClient.bpmnError(externalTaskId, errorCode, errorMessage, variables);
} catch (EngineClientException e) {
throw LOG.handledEngineClientException("no... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\task\impl\ExternalTaskServiceImpl.java | 1 |
请完成以下Java代码 | public class CallActivity extends Activity {
protected String calledElement;
protected boolean inheritVariables;
protected List<IOParameter> inParameters = new ArrayList<IOParameter>();
protected List<IOParameter> outParameters = new ArrayList<IOParameter>();
protected String businessKey;
prote... | return inheritBusinessKey;
}
public void setInheritBusinessKey(boolean inheritBusinessKey) {
this.inheritBusinessKey = inheritBusinessKey;
}
public CallActivity clone() {
CallActivity clone = new CallActivity();
clone.setValues(this);
return clone;
}
public voi... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\CallActivity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BusinessRuleEventProcessorWatcher
{
@NonNull private static final Logger logger = LogManager.getLogger(BusinessRuleEventProcessorWatcher.class);
@NonNull private final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class);
@NonNull private final BusinessRuleService ruleService;
private static fi... | logger.warn("Failed to process. Ignored.", ex);
}
}
}
private void sleep() throws InterruptedException
{
final Duration pollInterval = getPollInterval();
logger.debug("Sleeping {}", pollInterval);
Thread.sleep(pollInterval.toMillis());
}
private Duration getPollInterval()
{
final int pollIntervalIn... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\business_rule\server\BusinessRuleEventProcessorWatcher.java | 2 |
请完成以下Java代码 | class ProductBOMCycleDetection
{
public static ProductBOMCycleDetection newInstance()
{
return new ProductBOMCycleDetection();
}
private static final AdMessageKey ERR_PRODUCT_BOM_CYCLE = AdMessageKey.of("Product_BOM_Cycle_Error");
private final Set<ProductId> seenProductIds = new LinkedHashSet<>();
private Pr... | return productNode;
}
private static boolean isByOrCoProduct(final I_PP_Product_BOMLine bomLine)
{
final BOMComponentType componentType = BOMComponentType.ofCode(Objects.requireNonNull(bomLine.getComponentType()));
return componentType.isByOrCoProduct();
}
@Nullable
private DefaultMutableTreeNode assertNoCy... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\impl\ProductBOMCycleDetection.java | 1 |
请完成以下Java代码 | public String execute()
{
final String name = !Check.isEmpty(this.nameInitial, true)
? this.nameInitial.trim()
: buildDefaultName();
return truncateAndMakeUnique(name);
}
private String buildDefaultName()
{
String defaultName = "";
//
// City
defaultName = appendToName(defaultName, address.ge... | else if (Check.isEmpty(namePartToAppend, true))
{
return name.trim();
}
else
{
return name.trim() + " " + namePartToAppend.trim();
}
}
private boolean isValidUniqueName(final String name)
{
return !Check.isEmpty(name, true)
&& !existingNames.contains(name);
}
private String truncateAndMakeU... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MakeUniqueLocationNameCommand.java | 1 |
请完成以下Java代码 | public int compare(final I_M_HU_Attribute o1, final I_M_HU_Attribute o2)
{
// Same instance
if (o1 == o2)
{
return 0;
}
final int seqNo1 = getSeqNo(o1);
final int seqNo2 = getSeqNo(o2);
if (seqNo1 < seqNo2)
{
return -1;
}
else if (seqNo1 == seqNo2)
{
// NOTE: basically those are equal b... | return 1;
}
private int getSeqNo(final I_M_HU_Attribute huAttribute)
{
final AttributeId attributeId = AttributeId.ofRepoId(huAttribute.getM_Attribute_ID());
final int seqNo = piAttributes.getSeqNoByAttributeId(attributeId, 0);
// if the seqNo is zero/null, the attribute shall be last
return seqNo != 0 ? se... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUAttributesBySeqNoComparator.java | 1 |
请完成以下Java代码 | public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
re... | 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 + ", title=" + title + "... | repos\Hibernate-SpringBoot-master\HibernateSpringBootEnableLazyLoadNoTrans\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public class MyDtoWithSpecialField {
private String[] stringValue;
private int intValue;
private boolean booleanValue;
public MyDtoWithSpecialField() {
super();
}
public MyDtoWithSpecialField(final String[] stringValue, final int intValue, final boolean booleanValue) {
super()... | public boolean isBooleanValue() {
return booleanValue;
}
public void setBooleanValue(final boolean booleanValue) {
this.booleanValue = booleanValue;
}
//
@Override
public String toString() {
return "MyDto [stringValue=" + stringValue + ", intValue=" + intValue + ", boo... | repos\tutorials-master\jackson-simple\src\main\java\com\baeldung\jackson\ignore\MyDtoWithSpecialField.java | 1 |
请完成以下Java代码 | private void handlePayment(final BPartnerId newPartnerId, final I_C_Payment payment)
{
if (payment == null)
{
// nothing to do
return;
}
// Reverse all allocation from the payment
Services.get(IESRImportBL.class).reverseAllocationForPayment(payment);
InterfaceWrapperHelper.save(payment);
if (newP... | final Timestamp paymentDate = esrImportLine.getPaymentDate();
if (paymentDate == null)
{
// nothing to do.
}
else
{
esrImportLine.setAccountingDate(paymentDate);
}
}
@ModelChange(timings = ModelValidator.TYPE_BEFORE_CHANGE,
ifColumnsChanged = I_ESR_ImportLine.COLUMNNAME_C_Payment_ID)
public v... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\model\validator\ESR_ImportLine.java | 1 |
请完成以下Java代码 | public void setAD_UserGroup_ID (int AD_UserGroup_ID)
{
if (AD_UserGroup_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_UserGroup_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_UserGroup_ID, Integer.valueOf(AD_UserGroup_ID));
}
/** Get Nutzergruppe.
@return Nutzergruppe */
@Override
public int getAD_User... | @Override
public void setRecord_ID (int Record_ID)
{
if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
/** Get Datensatz-ID.
@return Direct internal record ID
*/
@Override
public int getRecord_ID ()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Private_Access.java | 1 |
请完成以下Java代码 | public int getR_StatusCategory_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_R_StatusCategory_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Status.
@param R_Status_ID
Request Status
*/
public void setR_Status_ID (int R_Status_ID)
{
if (R_Status_ID < 1)
set_ValueNoChe... | {
return (I_R_Status)MTable.get(getCtx(), I_R_Status.Table_Name)
.getPO(getUpdate_Status_ID(), get_TrxName()); }
/** Set Update Status.
@param Update_Status_ID
Automatically change the status after entry from web
*/
public void setUpdate_Status_ID (int Update_Status_ID)
{
if (Update_Status_ID < 1)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_Status.java | 1 |
请完成以下Java代码 | public PageData<Customer> findCustomersByTenantId(TenantId tenantId, PageLink pageLink) {
log.trace("Executing findCustomersByTenantId, tenantId [{}], pageLink [{}]", tenantId, pageLink);
Validator.validateId(tenantId, id -> "Incorrect tenantId " + id);
Validator.validatePageLink(pageLink);
... | @Override
public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findCustomerById(tenantId, new CustomerId(entityId.getId())));
}
@Override
public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) {
re... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\customer\CustomerServiceImpl.java | 1 |
请完成以下Java代码 | public class C_Aggregation
{
@ModelChange(timings = ModelValidator.TYPE_BEFORE_CHANGE, ifColumnsChanged = I_C_Aggregation.COLUMNNAME_AD_Table_ID)
public void assertTableNotChangedWhenItemsDefined(final I_C_Aggregation aggregation)
{
final boolean hasItems = Services.get(IAggregationDAO.class)
.retrieveAllItems... | {
final IAggregationListeners aggregationListeners = Services.get(IAggregationListeners.class);
final ModelChangeType type = ModelChangeType.valueOf(changeType);
if (type.isNew())
{
aggregationListeners.fireAggregationCreated(aggregation);
}
else if (type.isChange())
{
aggregationListeners.fireAggr... | repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\model\validator\C_Aggregation.java | 1 |
请完成以下Java代码 | private boolean isConvertAttributeToLowerCase() {
return this.convertAttributeToLowerCase;
}
public void setConvertAttributeToLowerCase(boolean b) {
this.convertAttributeToLowerCase = b;
}
private boolean isConvertAttributeToUpperCase() {
return this.convertAttributeToUpperCase;
}
public void setConvertA... | private String getAttributePrefix() {
return (this.attributePrefix != null) ? this.attributePrefix : "";
}
public void setAttributePrefix(String string) {
this.attributePrefix = string;
}
private boolean isAddPrefixIfAlreadyExisting() {
return this.addPrefixIfAlreadyExisting;
}
public void setAddPrefixIf... | repos\spring-security-main\core\src\main\java\org\springframework\security\core\authority\mapping\SimpleAttributes2GrantedAuthoritiesMapper.java | 1 |
请完成以下Java代码 | public class X_M_Warehouse_Type extends org.compiere.model.PO implements I_M_Warehouse_Type, org.compiere.model.I_Persistent
{
/**
*
*/
private static final long serialVersionUID = -165383196L;
/** Standard Constructor */
public X_M_Warehouse_Type (Properties ctx, int M_Warehouse_Type_ID, String trxNam... | /** Set Warehouse Type.
@param M_Warehouse_Type_ID Warehouse Type */
@Override
public void setM_Warehouse_Type_ID (int M_Warehouse_Type_ID)
{
if (M_Warehouse_Type_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Warehouse_Type_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Warehouse_Type_ID, Integer.valueOf(M_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Warehouse_Type.java | 1 |
请完成以下Java代码 | public static PaymentDirection ofSOTrx(@NonNull final SOTrx soTrx)
{
final boolean creditMemo = false;
return ofSOTrxAndCreditMemo(soTrx, creditMemo);
}
public static PaymentDirection ofSOTrxAndCreditMemo(@NonNull final SOTrx soTrx, final boolean creditMemo)
{
if (soTrx.isPurchase())
{
return !creditMem... | {
return this == OUTBOUND;
}
public Amount convertPayAmtToStatementAmt(@NonNull final Amount payAmt)
{
return payAmt.negateIf(isOutboundPayment());
}
public Money convertPayAmtToStatementAmt(@NonNull final Money payAmt)
{
return payAmt.negateIf(isOutboundPayment());
}
public Money convertStatementAmtTo... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\PaymentDirection.java | 1 |
请完成以下Java代码 | public void setTaxIndicator (String TaxIndicator)
{
set_Value (COLUMNNAME_TaxIndicator, TaxIndicator);
}
/** Get Tax Indicator.
@return Short form for Tax to be printed on documents
*/
public String getTaxIndicator ()
{
return (String)get_Value(COLUMNNAME_TaxIndicator);
}
/** Set UPC/EAN.
@param UP... | Bar Code (Universal Product Code or its superset European Article Number)
*/
public void setUPC (String UPC)
{
set_Value (COLUMNNAME_UPC, UPC);
}
/** Get UPC/EAN.
@return Bar Code (Universal Product Code or its superset European Article Number)
*/
public String getUPC ()
{
return (String)get_Value(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Invoice.java | 1 |
请完成以下Java代码 | public class MAssetDelivery extends X_A_Asset_Delivery
{
/**
*
*/
private static final long serialVersionUID = -1731010685101745675L;
/**
* Constructor
*
* @param ctx context
* @param A_Asset_Delivery_ID id or 0
* @param trxName trx
*/
@SuppressWarnings("unused")
public... | * @param trxName transaction
*/
public MAssetDelivery(Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
} // MAssetDelivery
/**
* String representation
*
* @return info
*/
@Override
public String toString()
{
return "MAssetDelivery["
+ get_ID()
+ ",A_Asset_ID=" + ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MAssetDelivery.java | 1 |
请完成以下Java代码 | public class DispatcherHandlerMappingDetails {
private @Nullable HandlerMethodDescription handlerMethod;
private @Nullable HandlerFunctionDescription handlerFunction;
private @Nullable RequestMappingConditionsDescription requestMappingConditions;
public @Nullable HandlerMethodDescription getHandlerMethod() {
... | }
void setHandlerFunction(@Nullable HandlerFunctionDescription handlerFunction) {
this.handlerFunction = handlerFunction;
}
public @Nullable RequestMappingConditionsDescription getRequestMappingConditions() {
return this.requestMappingConditions;
}
void setRequestMappingConditions(@Nullable RequestMappingCo... | repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\actuate\web\mappings\DispatcherHandlerMappingDetails.java | 1 |
请完成以下Java代码 | public String getMeta_RobotsTag ()
{
return (String)get_Value(COLUMNNAME_Meta_RobotsTag);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name. | @return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WebProject.java | 1 |
请完成以下Java代码 | public void setLineEnding(String lineEnding)
{
this.lineEnding = lineEnding;
}
@SuppressWarnings("UnusedReturnValue")
public CSVWriter setAllowMultilineFields(final boolean allowMultilineFields)
{
this.allowMultilineFields = allowMultilineFields;
return this;
}
public void setHeader(final List<String> he... | final String valueStr;
if (value == null)
{
valueStr = "";
}
else if (value instanceof java.util.Date)
{
valueStr = dateFormat.format(value);
}
else
{
valueStr = value.toString();
}
return quoteCsvValue(valueStr);
}
private String quoteCsvValue(String valueStr)
{
return fieldQuote
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\CSVWriter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public I_C_InvoiceLine createInvoiceLine(String trxName)
{
throw new UnsupportedOperationException();
}
private List<I_C_AllocationLine> retrieveAllocationLines(final org.compiere.model.I_C_Invoice invoice)
{
Adempiere.assertUnitTestMode();
return db.getRecords(I_C_AllocationLine.class, pojo -> {
if (poj... | CurrencyId.ofRepoId(ah.getC_Currency_ID()), // CurFrom_ID
CurrencyId.ofRepoId(invoice.getC_Currency_ID()), // CurTo_ID
ah.getDateTrx().toInstant(), // ConvDate
CurrencyConversionTypeId.ofRepoIdOrNull(invoice.getC_ConversionType_ID()),
ClientId.ofRepoId(line.getAD_Client_ID()),
OrgId.ofRepo... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\PlainInvoiceDAO.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Deployment deploy(String name, String tenantId, String category, InputStream in) {
return createDeployment().addInputStream(name + BPMN_FILE_SUFFIX, in)
.name(name)
.tenantId(tenantId)
.category(category)
.deploy();
}
@Override
... | @Override
public Deployment deployName(String deploymentName) {
List<Deployment> list = repositoryService
.createDeploymentQuery()
.deploymentName(deploymentName).list();
Assert.notNull(list, "list must not be null");
return list.get(0);
}
@Override
... | repos\spring-boot-quick-master\quick-flowable\src\main\java\com\quick\flowable\service\handler\ProcessHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public OssPolicyResult policy() {
OssPolicyResult result = new OssPolicyResult();
// 存储目录
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
String dir = ALIYUN_OSS_DIR_PREFIX+sdf.format(new Date());
// 签名有效期
long expireEndTime = System.currentTimeMillis() + ALIYUN_OSS_EXPIRE * 1000;
Date expiration... | } catch (Exception e) {
LOGGER.error("签名生成失败", e);
}
return result;
}
@Override
public OssCallbackResult callback(HttpServletRequest request) {
OssCallbackResult result= new OssCallbackResult();
String filename = request.getParameter("filename");
filename = "http://".concat(ALIYUN_OSS_BUCKET_NAME).conc... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\OssServiceImpl.java | 2 |
请完成以下Java代码 | default List<I_PP_Order> getByIds(final Set<PPOrderId> orderIds)
{
return getByIds(orderIds, I_PP_Order.class);
}
<T extends I_PP_Order> List<T> getByIds(Set<PPOrderId> orderIds, Class<T> type);
/**
* Gets released manufacturing orders based on {@link I_M_Warehouse}s.
*
* @return manufacturing orders
*... | void changeOrderScheduling(PPOrderId orderId, Instant scheduledStartDate, Instant scheduledFinishDate);
Stream<I_PP_Order> streamOpenPPOrderIdsOrderedByDatePromised(ResourceId plantId);
List<I_PP_Order> retrieveManufacturingOrders(@NonNull ManufacturingOrderQuery query);
void save(I_PP_Order order);
void saveAl... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\IPPOrderDAO.java | 1 |
请完成以下Java代码 | public I_M_AttributeInstance createNewAttributeInstance(
final Properties ctx,
final I_M_AttributeSetInstance asi,
@NonNull final AttributeId attributeId,
final String trxName)
{
final I_M_AttributeInstance ai = InterfaceWrapperHelper.create(ctx, I_M_AttributeInstance.class, trxName);
ai.setAD_Org_ID(a... | public void save(@NonNull final I_M_AttributeInstance ai)
{
saveRecord(ai);
}
@Override
public Set<AttributeId> getAttributeIdsByAttributeSetInstanceId(@NonNull final AttributeSetInstanceId attributeSetInstanceId)
{
return queryBL
.createQueryBuilderOutOfTrx(I_M_AttributeInstance.class)
.addEqualsFilt... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributeSetInstanceDAO.java | 1 |
请完成以下Java代码 | public class HtmlDocumentBuilder {
protected HtmlWriteContext context = new HtmlWriteContext();
protected Deque<HtmlElementWriter> elements = new ArrayDeque<>();
protected StringWriter writer = new StringWriter();
public HtmlDocumentBuilder(HtmlElementWriter documentElement) {
startElement(documentElemen... | }
public String getHtmlString() {
return writer.toString();
}
public class HtmlWriteContext {
public StringWriter getWriter() {
return writer;
}
public int getElementStackSize() {
return elements.size();
}
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\engine\HtmlDocumentBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected boolean isEligibleForScheduling(final I_C_Order model)
{
return model != null && model.getC_Order_ID() > 0;
}
@Override
protected Properties extractCtxFromItem(final I_C_Order item)
{
return Env.getCtx();
}
@Override
protected String extractTrxNameFromItem(final I_C_Order item)
{
... | {
return TableRecordReference.of(I_C_Order.Table_Name, item.getC_Order_ID());
}
};
@Override
public Result processWorkPackage(final I_C_Queue_WorkPackage workPackage, final String localTrxName)
{
// retrieve the order and generate requests
queueDAO.retrieveAllItems(workPackage, I_C_Order.class)
.forEa... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\request\service\async\spi\impl\R_Request_CreateFromOrder_Async.java | 2 |
请完成以下Java代码 | public List<FlowElementMoveEntry> getMoveToFlowElements() {
return new ArrayList<>(moveToFlowElementMap.values());
}
public void addCurrentActivityToNewElement(String curentActivityId, FlowElement originalFlowElement, FlowElement newFlowElement) {
currentActivityToNewElementMap.put(curentAc... | }
public Map<String, Map<String, Object>> getFlowElementLocalVariableMap() {
return flowElementLocalVariableMap;
}
public void setFlowElementLocalVariableMap(Map<String, Map<String, Object>> flowElementLocalVariableMap) {
this.flowElementLocalVariableMap = flowElementLocalVariableMap;
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\dynamic\MoveExecutionEntityContainer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Throttler {
/**
* Request throttling type.
*/
private @Nullable ThrottlerType type;
/**
* Maximum number of requests that can be enqueued when the throttling threshold
* is exceeded.
*/
private @Nullable Integer maxQueueSize;
/**
* Maximum number of requests that are a... | }
/**
* Name of the algorithm used to compress protocol frames.
*/
public enum Compression {
/**
* Requires 'net.jpountz.lz4:lz4'.
*/
LZ4,
/**
* Requires org.xerial.snappy:snappy-java.
*/
SNAPPY,
/**
* No compression.
*/
NONE
}
public enum ThrottlerType {
/**
* Limit th... | repos\spring-boot-4.0.1\module\spring-boot-cassandra\src\main\java\org\springframework\boot\cassandra\autoconfigure\CassandraProperties.java | 2 |
请完成以下Java代码 | public void checkReadHistoricExternalTaskLog(HistoricExternalTaskLogEntity historicExternalTaskLog) {
if (historicExternalTaskLog != null && !getTenantManager().isAuthenticatedTenant(historicExternalTaskLog.getTenantId())) {
throw LOG.exceptionCommandWithUnauthorizedTenant("get the historic external task log ... | @Override
public void checkDeleteMetrics() {
}
@Override
public void checkDeleteTaskMetrics() {
}
@Override
public void checkReadSchemaLog() {
}
// helper //////////////////////////////////////////////////
protected TenantManager getTenantManager() {
return Context.getCommandContext().getTen... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\multitenancy\TenantCommandChecker.java | 1 |
请完成以下Java代码 | public void execute()
{
final List<PrintingQueueQueryRequest> queryRequests = getPrintingQueueQueryBuilders();
if (queryRequests.isEmpty())
{
Loggables.withLogger(logger, Level.DEBUG).addLog("*** No queries / sysconfigs defined. Create sysconfigs prefixed with `{}`", QUERY_PREFIX);
return;
}
for (fina... | final ArrayList<PrintingQueueQueryRequest> queries = new ArrayList<>();
for (final String key : keys)
{
final String whereClause = filtersMap.get(key);
final IQuery<I_C_Printing_Queue> query = createPrintingQueueQuery(whereClause);
final PrintingQueueQueryRequest request = PrintingQueueQueryRequest.builde... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\model\validator\ConcatenatePDFsCommand.java | 1 |
请完成以下Java代码 | public frame setNoResize(boolean noresize)
{
if ( noresize == true )
addAttribute("noresize", "noresize");
else
removeAttribute("noresize");
return(this);
}
/**
Sets the lang="" and xml:lang="" attributes
@param lang... | @param element Adds an Element to the element.
*/
public frame addElement(Element element)
{
addElementToRegistry(element);
return(this);
}
/**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public frame addE... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\frame.java | 1 |
请完成以下Java代码 | protected EnumItem<E> createValue(String[] params)
{
Map.Entry<String, Map.Entry<String, Integer>[]> args = EnumItem.create(params);
EnumItem<E> nrEnumItem = new EnumItem<E>();
for (Map.Entry<String, Integer> e : args.getValue())
{
nrEnumItem.labelMap.put(valueOf(e.getKey... | int currentSize = byteArray.nextInt();
EnumItem<E> item = newItem();
for (int j = 0; j < currentSize; ++j)
{
E nr = nrArray[byteArray.nextInt()];
int frequency = byteArray.nextInt();
item.labelMap.put(nr, frequency);
}
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\common\EnumItemDictionary.java | 1 |
请完成以下Java代码 | private WebuiLetterEntry getLetterEntry(final String letterId)
{
final WebuiLetterEntry letterEntry = lettersById.getIfPresent(letterId);
if (letterEntry == null)
{
throw new EntityNotFoundException("Letter not found").setParameter("letterId", letterId);
}
return letterEntry;
}
public WebuiLetter getLe... | @ToString
private static final class WebuiLetterEntry
{
private WebuiLetter letter;
public WebuiLetterEntry(@NonNull final WebuiLetter letter)
{
this.letter = letter;
}
public synchronized WebuiLetter getLetter()
{
return letter;
}
public synchronized WebuiLetterChangeResult compute(final Una... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\letter\WebuiLetterRepository.java | 1 |
请完成以下Java代码 | public Set<MatchingKey> getMatchingKeys()
{
return ImmutableSet.of(MatchingKey.ofTableName(I_PP_Order_Weighting_RunCheck.Table_Name));
}
@Override
public QuickInputDescriptor createQuickInputDescriptor(
final DocumentType documentType,
final DocumentId documentTypeId,
final DetailId detailId,
@NonNul... | .setDetailId(detailId)
.setTableName(I_PP_Order_Weighting_RunCheck.Table_Name)
.addField(DocumentFieldDescriptor.builder(PPOrderWeightingCheckQuickInput.COLUMNNAME_Weight)
.setCaption(TranslatableStrings.adElementOrMessage(PPOrderWeightingCheckQuickInput.COLUMNNAME_Weight))
.setWidgetType(DocumentFi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\manufacturing\order\weighting\run\quickinput\PPOrderWeightingCheckQuickInputDescriptorFactory.java | 1 |
请完成以下Java代码 | protected String getInternalValueStringInitial()
{
return huAttribute.getValueInitial();
}
@Override
protected BigDecimal getInternalValueNumberInitial()
{
return huAttribute.getValueNumberInitial();
}
@Override
protected void setInternalValueStringInitial(final String value)
{
huAttribute.setValueInit... | getHUAttributesDAO().save(huAttribute);
}
@Override
public boolean isNew()
{
return huAttribute.getM_HU_Attribute_ID() <= 0;
}
@Override
protected void setInternalValueDate(Date value)
{
huAttribute.setValueDate(TimeUtil.asTimestamp(value));
this.valueDate = value;
}
@Override
protected Date getInte... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\HUAttributeValue.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8888
spring:
application:
name: zuul-application
# Zuul 配置项,对应 ZuulProperties 配置类
zuul:
servlet-path: / # ZuulServlet 匹配的路径,默认为 /zuul
# 路由配置项,对应 ZuulRoute Map
routes:
route_yudaoyuanma:
path: /blog/**
| url: http://www.iocoder.cn
route_oschina:
path: /oschina/**
url: https://www.oschina.net | repos\SpringBoot-Labs-master\labx-21\labx-21-sc-zuul-demo01\src\main\resources\application.yaml | 2 |
请在Spring Boot框架中完成以下Java代码 | private PickingJob markAsVoidedAndSave(PickingJob pickingJob)
{
pickingJob = pickingJob.withDocStatus(PickingJobDocStatus.Voided);
pickingJobRepository.save(pickingJob);
return pickingJob;
}
// private PickingJob unpickAllStepsAndSave(final PickingJob pickingJob)
// {
// return PickingJobUnPickCommand.buil... | private PickingJob releasePickingSlotAndSave(PickingJob pickingJob)
{
final PickingJobId pickingJobId = pickingJob.getId();
final PickingSlotId pickingSlotId = pickingJob.getPickingSlotId().orElse(null);
if (pickingSlotId != null)
{
pickingJob = pickingJob.withPickingSlot(null);
pickingJobRepository.save... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\PickingJobAbortCommand.java | 2 |
请完成以下Java代码 | public Object getBaseObject()
{
return prospect;
}
@Override
public int getAD_Table_ID()
{
return X_R_Group.Table_ID;
}
@Override
public int getRecord_ID()
{
return prospect.getR_Group_ID();
}
@Override
public EMail sendEMail(I_AD_User from, String toEmail, String subj... | });
}
private void notifyLetter(MADBoilerPlate text, MRGroupProspect prospect)
{
throw new UnsupportedOperationException();
}
private List<MRGroupProspect> getProspects(int R_Group_ID)
{
final String whereClause = MRGroupProspect.COLUMNNAME_R_Group_ID + "=?";
return new Query(getCtx(), MRGroupProspect.Tab... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\report\AD_BoilderPlate_SendToGroup.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPath() {
return this.path;
}
public void setPath(String path) {
Assert.notNull(path, "'path' must not be null");
Assert.isTrue(path.length() > 1, "'path' must have length greater than 1");
Assert.isTrue(path.startsWith("/"), "'path' must start with '/'");
this.path = path;
}
public bool... | /**
* Password to access preferences and tools of H2 Console.
*/
private @Nullable String webAdminPassword;
public boolean isTrace() {
return this.trace;
}
public void setTrace(boolean trace) {
this.trace = trace;
}
public boolean isWebAllowOthers() {
return this.webAllowOthers;
}
pub... | repos\spring-boot-4.0.1\module\spring-boot-h2console\src\main\java\org\springframework\boot\h2console\autoconfigure\H2ConsoleProperties.java | 2 |
请完成以下Java代码 | public Set<CourseRegistration> getRegistrations() {
return registrations;
}
public void setRegistrations(Set<CourseRegistration> registrations) {
this.registrations = registrations;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
re... | return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Course other = (Course) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return f... | repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\manytomany\model\Course.java | 1 |
请完成以下Java代码 | private ItemReader<TestData> dataSourceItemReader() throws Exception {
JdbcPagingItemReader<TestData> reader = new JdbcPagingItemReader<>();
reader.setDataSource(dataSource); // 设置数据源
reader.setFetchSize(5); // 每次取多少条记录
reader.setPageSize(5); // 设置每页数据量
// 指定sql查询语句 select id,fi... | data.setField3(resultSet.getString(4));
return data;
});
Map<String, Order> sort = new HashMap<>(1);
sort.put("id", Order.ASCENDING);
provider.setSortKeys(sort); // 设置排序,通过id 升序
reader.setQueryProvider(provider);
// 设置namedParameterJdbcTemplate等属性
r... | repos\SpringAll-master\68.spring-batch-itemreader\src\main\java\cc\mrbird\batch\job\DataSourceItemReaderDemo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String[] getRelationTypesWithFailureRelation(Class<?> clazz, RuleNode nodeAnnotation) {
List<String> relationTypes = new ArrayList<>(Arrays.asList(nodeAnnotation.relationTypes()));
if (TbOriginatorTypeSwitchNode.class.equals(clazz)) {
relationTypes.addAll(EntityType.NORMAL_NAMES);
... | return getComponents(types, edgeComponentsMap);
} else {
log.error("Unsupported rule chain type {}", ruleChainType);
throw new RuntimeException("Unsupported rule chain type " + ruleChainType);
}
}
@Override
public Optional<ComponentDescriptor> getComponent(String cla... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\component\AnnotationComponentDiscoveryService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private static @Nullable Builder getBuilderFromIssuerIfPossible(String registrationId,
@Nullable String configuredProviderId, Map<String, Provider> providers) {
String providerId = (configuredProviderId != null) ? configuredProviderId : registrationId;
if (providers.containsKey(providerId)) {
Provider provide... | map.from(provider::getAuthorizationUri).to(builder::authorizationUri);
map.from(provider::getTokenUri).to(builder::tokenUri);
map.from(provider::getUserInfoUri).to(builder::userInfoUri);
map.from(provider::getUserInfoAuthenticationMethod)
.as(AuthenticationMethod::new)
.to(builder::userInfoAuthenticationMet... | repos\spring-boot-4.0.1\module\spring-boot-security-oauth2-client\src\main\java\org\springframework\boot\security\oauth2\client\autoconfigure\OAuth2ClientPropertiesMapper.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int compareTo(ItemHint other) {
return getName().compareTo(other.getName());
}
public static ItemHint newHint(String name, ValueHint... values) {
return new ItemHint(name, Arrays.asList(values), Collections.emptyList());
}
@Override
public String toString() {
return "ItemHint{name='" + this.name + "... | private final String name;
private final Map<String, Object> parameters;
public ValueProvider(String name, Map<String, Object> parameters) {
this.name = name;
this.parameters = parameters;
}
public String getName() {
return this.name;
}
public Map<String, Object> getParameters() {
return thi... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\ItemHint.java | 2 |
请完成以下Java代码 | public boolean isAutoComplete() {
return autoCompleteAttribute.getValue(this);
}
public void setAutoComplete(boolean autoComplete) {
autoCompleteAttribute.setValue(this, autoComplete);
}
public Collection<Sentry> getExitCriterias() {
return exitCriteriaRefCollection.getReferenceTargetElements(this... | });
autoCompleteAttribute = typeBuilder.booleanAttribute(CMMN_ATTRIBUTE_AUTO_COMPLETE)
.defaultValue(false)
.build();
exitCriteriaRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXIT_CRITERIA_REFS)
.namespace(CMMN10_NS)
.idAttributeReferenceCollection(Sentry.class, C... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\StageImpl.java | 1 |
请完成以下Java代码 | private Optional<TbPair<Long, Long>> findValidPack(List<TbMsg> msgs, long deduplicationTimeoutMs) {
Optional<TbMsg> min = msgs.stream().min(Comparator.comparing(TbMsg::getMetaDataTs));
return min.map(minTsMsg -> {
long packStartTs = minTsMsg.getMetaDataTs();
long packEndTs = pack... | ObjectNode msgNode = JacksonUtil.newObjectNode();
msgNode.set("msg", JacksonUtil.toJsonNode(msg.getData()));
msgNode.set("metadata", JacksonUtil.valueToTree(msg.getMetaData().getData()));
mergedData.add(msgNode);
});
return JacksonUtil.toString(mergedData);
}
... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\deduplication\TbMsgDeduplicationNode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<HCURR1> getHCURR1() {
if (hcurr1 == null) {
hcurr1 = new ArrayList<HCURR1>();
}
return this.hcurr1;
}
/**
* Gets the value of the hpayt1 property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. The... | public List<HALCH1> getHALCH1() {
if (halch1 == null) {
halch1 = new ArrayList<HALCH1>();
}
return this.halch1;
}
/**
* Gets the value of the detail property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. The... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_invoic\de\metas\edi\esb\jaxb\stepcom\invoic\HEADERXrech.java | 2 |
请完成以下Java代码 | public List<IOParameter> getInParameters() {
return inParameters;
}
@Override
public void addInParameter(IOParameter inParameter) {
if (inParameters == null) {
inParameters = new ArrayList<>();
}
inParameters.add(inParameter);
}
@Override
public void... | }
public void setValues(ScriptTask otherElement) {
super.setValues(otherElement);
setScriptFormat(otherElement.getScriptFormat());
setScript(otherElement.getScript());
setResultVariable(otherElement.getResultVariable());
setSkipExpression(otherElement.getSkipExpression());
... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\ScriptTask.java | 1 |
请完成以下Java代码 | public List<User> getAll() {
Query query = entityManager.createQuery("SELECT e FROM User e");
return query.getResultList();
}
@Override
public void save(User user) {
executeInsideTransaction(entityManager -> entityManager.persist(user));
}
@Override
public void ... | @Override
public void delete(User user) {
executeInsideTransaction(entityManager -> entityManager.remove(user));
}
private void executeInsideTransaction(Consumer<EntityManager> action) {
final EntityTransaction tx = entityManager.getTransaction();
try {
tx.begin();
... | repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\daopattern\daos\JpaUserDao.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public Date getCreatedBefore() {
return createdBefore;
}
public void setCreatedBefore(Date createdBefore) {
this.createdBefore = createdBefore;
}
publ... | public void setIncludeEnded(Boolean includeEnded) {
this.includeEnded = includeEnded;
}
public Boolean getIncludeLocalVariables() {
return includeLocalVariables;
}
public void setIncludeLocalVariables(boolean includeLocalVariables) {
this.includeLocalVariables = includeLocalVar... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\planitem\PlanItemInstanceQueryRequest.java | 2 |
请完成以下Java代码 | public String getTaskId() {
return taskId;
}
@Override
public String getBatchId() {
return null;
}
public String getActivityInstanceId() {
return activityInstanceId;
}
public String getErrorMessage() {
return errorMessage;
}
public String getTenantId() {
return tenantId;
}
... | public ProcessEngineServices getProcessEngineServices() {
return Context.getProcessEngineConfiguration().getProcessEngine();
}
public ProcessEngine getProcessEngine() {
return Context.getProcessEngineConfiguration().getProcessEngine();
}
public static DelegateCaseVariableInstanceImpl fromVariableInsta... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\variable\listener\DelegateCaseVariableInstanceImpl.java | 1 |
请完成以下Java代码 | public class BufferedPrintConnectionEndpoint implements IPrintConnectionEndpoint
{
private final transient Logger log = Logger.getLogger(getClass().getName());
private final Queue<PrintPackageAndData> printPackageQueue = new LinkedList<PrintPackageAndData>();
private final Map<String, PrintPackageAndData> trx2Prin... | return null;
}
System.out.println("getNextPrintPackage: " + item.printPackage);
return item.printPackage;
}
}
@Override
public InputStream getPrintPackageData(final PrintPackage printPackage)
{
synchronized (sync)
{
final String trx = printPackage.getTransactionId();
final PrintPackageAndData... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\endpoint\BufferedPrintConnectionEndpoint.java | 1 |
请完成以下Java代码 | default String getUsername() {
return getClaimAsString(OAuth2TokenIntrospectionClaimNames.USERNAME);
}
/**
* Returns the client identifier {@code (client_id)} for the token
* @return the client identifier for the token
*/
@Nullable
default String getClientId() {
return getClaimAsString(OAuth2TokenIntrosp... | * @return a timestamp indicating when the token is not to be used before
*/
@Nullable
default Instant getNotBefore() {
return getClaimAsInstant(OAuth2TokenIntrospectionClaimNames.NBF);
}
/**
* Returns usually a machine-readable identifier {@code (sub)} of the resource owner
* who authorized the token
* @... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\OAuth2TokenIntrospectionClaimAccessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CampaignPrice
{
@NonNull
ProductId productId;
@Nullable
BPartnerId bpartnerId;
@Nullable
BPGroupId bpGroupId;
@Nullable
PricingSystemId pricingSystemId;
@NonNull
CountryId countryId;
@NonNull
Range<LocalDate> validRange;
@Nullable
Money priceList;
@NonNull
Money priceStd; | @NonNull
UomId priceUomId;
@NonNull
TaxCategoryId taxCategoryId;
@NonNull
@Default
InvoicableQtyBasedOn invoicableQtyBasedOn = InvoicableQtyBasedOn.NominalWeight;
public LocalDate getValidFrom()
{
return getValidRange().lowerEndpoint();
}
public CurrencyId getCurrencyId()
{
return getPriceStd().getCu... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\campaign_price\CampaignPrice.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected static int getConfigInt(String name, int defaultVal, int minVal) {
if (cacheMap.containsKey(name)) {
return (int)cacheMap.get(name);
}
int val = NumberUtils.toInt(getConfig(name));
if (val == 0) {
val = defaultVal;
} else if (val < minVal) {
... | }
public static int getRemoveAppNoMachineMillis() {
return getConfigInt(CONFIG_REMOVE_APP_NO_MACHINE_MILLIS, 0, 120000);
}
public static int getAutoRemoveMachineMillis() {
return getConfigInt(CONFIG_AUTO_REMOVE_MACHINE_MILLIS, 0, 300000);
}
public static int getUnhealt... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\config\DashboardConfig.java | 2 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | }
/** Set Gueltig.
@param IsValid
Element ist gueltig
*/
public void setIsValid (boolean IsValid)
{
set_Value (COLUMNNAME_IsValid, Boolean.valueOf(IsValid));
}
/** Get Gueltig.
@return Element ist gueltig
*/
public boolean isValid ()
{
Object oo = get_Value(COLUMNNAME_IsValid);
if (oo != nu... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\adempiere\model\X_AD_Table_MView.java | 1 |
请完成以下Java代码 | private void saveIssuesToBOMLine(
@NonNull final PickingCandidateId pickingCandidateId,
@NonNull final ImmutableList<PickingCandidateIssueToBOMLine> issuesToPickingOrder)
{
final HashMap<PickingCandidateIssueToBOMLineKey, I_M_Picking_Candidate_IssueToOrder> existingRecordsByKey = streamIssuesToBOMLineRecords(p... | .addEqualsFilter(I_M_Picking_Candidate_IssueToOrder.COLUMNNAME_M_Picking_Candidate_ID, pickingCandidateId)
.create()
.stream();
}
private void deleteIssuesToBOMLine(@NonNull final Collection<PickingCandidateId> pickingCandidateIds)
{
if (pickingCandidateIds.isEmpty())
{
return;
}
queryBL.createQ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\PickingCandidateRepository.java | 1 |
请完成以下Java代码 | public class ADRuleDAO implements IADRuleDAO
{
/** Cache by AD_Rule_ID */
private static CCache<Integer, I_AD_Rule> s_cacheById = new CCache<>(I_AD_Rule.Table_Name + "#by#AD_Rule_ID", 20);
private static CCache<String, I_AD_Rule> s_cacheByValue = new CCache<>(I_AD_Rule.Table_Name + "#by#Value", 20);
@Override
pub... | }
return rule;
});
}
private final I_AD_Rule retrieveByValue_NoCache(final Properties ctx, final String ruleValue)
{
return Services.get(IQueryBL.class)
.createQueryBuilder(I_AD_Rule.class, ctx, ITrx.TRXNAME_None)
.addEqualsFilter(I_AD_Rule.COLUMNNAME_Value, ruleValue)
.addOnlyActiveRecordsFilter... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\script\impl\ADRuleDAO.java | 1 |
请完成以下Java代码 | public void setOrderByClause (java.lang.String OrderByClause)
{
set_Value (COLUMNNAME_OrderByClause, OrderByClause);
}
/** Get Sql ORDER BY.
@return Fully qualified ORDER BY clause
*/
@Override
public java.lang.String getOrderByClause ()
{
return (java.lang.String)get_Value(COLUMNNAME_OrderByClause);
... | }
/** Set Sql WHERE.
@param WhereClause
Fully qualified SQL WHERE clause
*/
@Override
public void setWhereClause (java.lang.String WhereClause)
{
set_Value (COLUMNNAME_WhereClause, WhereClause);
}
/** Get Sql WHERE.
@return Fully qualified SQL WHERE clause
*/
@Override
public java.lang.String g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Ref_Table.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class QtyTUConvertor implements QtyConvertor
{
@NonNull IHUCapacityBL capacityBL;
@NonNull ProductId productId;
@NonNull I_M_HU_PI_Item_Product packingInstruction;
@NonNull I_C_UOM tuUOM;
@NonNull Map<UomId, Capacity> uomId2Capacity = new HashMap<>();
@Nullable
@Override
public Quantity convert(@Nullabl... | return Quantity.of(qtyTUQty, tuUOM);
}
@Override
public @NonNull UomId getTargetUomId()
{
return UomId.ofRepoId(tuUOM.getC_UOM_ID());
}
@NonNull
private Capacity getCapacityForUomId(@NonNull final I_C_UOM uom)
{
return uomId2Capacity.computeIfAbsent(UomId.ofRepoId(uom.getC_UOM_ID()),
(ignore)... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\QtyTUConvertor.java | 2 |
请完成以下Java代码 | public Parameter getSource() {
return sourceRefAttribute.getReferenceTargetElement(this);
}
public void setSource(Parameter parameter) {
sourceRefAttribute.setReferenceTargetElement(this, parameter);
}
public Parameter getTarget() {
return targetRefAttribute.getReferenceTargetElement(this);
}
... | .idAttributeReference(Parameter.class)
.build();
targetRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_TARGET_REF)
.idAttributeReference(Parameter.class)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
transformationChild = sequenceBuilder.element(Tra... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ParameterMappingImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected String getDatabaseName() {
return "test";
}
@Override
public MongoClient mongoClient() {
final ConnectionString connectionString = new ConnectionString("mongodb://localhost:27017/test");
final MongoClientSettings mongoClientSettings = MongoClientSettings.builder()
... | @Bean
public UserCascadeSaveMongoEventListener userCascadingMongoEventListener() {
return new UserCascadeSaveMongoEventListener();
}
@Bean
public CascadeSaveMongoEventListener cascadingMongoEventListener() {
return new CascadeSaveMongoEventListener();
}
@Bean
MongoTransacti... | repos\tutorials-master\persistence-modules\spring-data-mongodb-2\src\main\java\com\baeldung\config\MongoConfig.java | 2 |
请完成以下Java代码 | public void setProcessDefinitionCategory(String processDefinitionId, String category) {
commandExecutor.execute(new SetProcessDefinitionCategoryCmd(processDefinitionId, category));
}
public InputStream getProcessModel(String processDefinitionId) {
return commandExecutor.execute(new GetDeploymen... | return commandExecutor.execute(new GetModelEditorSourceCmd(modelId));
}
public byte[] getModelEditorSourceExtra(String modelId) {
return commandExecutor.execute(new GetModelEditorSourceExtraCmd(modelId));
}
public void addCandidateStarterUser(String processDefinitionId, String userId) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\RepositoryServiceImpl.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.