instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | default boolean isKey() { return getDescriptor().isKey(); }
default boolean isCalculated() { return getDescriptor().isCalculated(); }
default boolean isReadonlyVirtualField() { return getDescriptor().isReadonlyVirtualField(); }
default boolean isParentLink() { return getDescriptor().isParentLink(); }
/** Checks if ... | default <T extends RepoIdAware> Optional<T> getValueAsId(Class<T> idType) { return Optional.ofNullable(getValueAs(idType));}
/** @return initial value / last saved value */
@Nullable
Object getInitialValue();
/** @return old value (i.e. the value as it was when the document was checked out from repository/documents... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\IDocumentFieldView.java | 1 |
请完成以下Java代码 | public Timestamp getServiceDate ()
{
return (Timestamp)get_Value(COLUMNNAME_ServiceDate);
}
/** Set Text Message.
@param TextMsg
Text Message
*/
public void setTextMsg (String TextMsg)
{
set_Value (COLUMNNAME_TextMsg, TextMsg);
}
/** Get Text Message.
@return Text Message
*/
public String ge... | /** Set Valid from.
@param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
/** Get Valid from.
@return Valid from including this date (first day)
*/
public Timestamp getValidFrom ()
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Movement.java | 1 |
请完成以下Java代码 | final class GracefulShutdown {
private static final Log logger = LogFactory.getLog(GracefulShutdown.class);
private final Server server;
private final Supplier<Integer> activeRequests;
private volatile boolean aborted;
GracefulShutdown(Server server, Supplier<Integer> activeRequests) {
this.server = server;... | // Continue
}
}
}
private boolean isJetty10() {
try {
return CompletableFuture.class.equals(Connector.class.getMethod("shutdown").getReturnType());
}
catch (Exception ex) {
return false;
}
}
private void awaitShutdown(GracefulShutdownCallback callback) {
while (!this.aborted && this.activeReq... | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\GracefulShutdown.java | 1 |
请完成以下Java代码 | public String getTopicNamePrefix()
{
return WebsocketTopicNames.TOPIC_Dashboard;
}
@Override
public UserDashboardWebsocketProducer createProducer(final WebsocketTopicName topicName)
{
final WebuiSessionId sessionId = extractSessionId(topicName);
if (sessionId == null)
{
throw new AdempiereException("In... | {
final String sessionId = topicNameString.substring(WebsocketTopicNames.TOPIC_Dashboard.length() + 1).trim();
return WebuiSessionId.ofNullableString(sessionId);
}
else
{
return null;
}
}
public static WebsocketTopicName createWebsocketTopicName(@NonNull final WebuiSessionId sessionId)
{
return W... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\websocket\UserDashboardWebsocketProducerFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AdoptionService {
private final OwnerRepository ownersRepo;
private final PetRepository petsRepo;
private final SpeciesRepository speciesRepo;
/**
* Register a new pet for adoption. Initially, this pet will have no name or owner.
* @param speciesName
* @return The assigned ... | var pet = petsRepo.findPetByUuid(petUuid)
.orElseThrow(() -> new IllegalArgumentException("Unknown pet"));
pet.setOwner(null);
petsRepo.save(pet);
return pet;
}
public List<PetHistoryEntry> listPetHistory(UUID petUuid) {
var pet = petsRepo.findPetByUuid(petUuid)
... | repos\tutorials-master\persistence-modules\spring-data-envers\src\main\java\com\baeldung\envers\customrevision\service\AdoptionService.java | 2 |
请完成以下Java代码 | static Object normalizeValue(@Nullable final Object value)
{
if (value == null)
{
return null;
}
else if (value instanceof RepoIdAware)
{
return ((RepoIdAware)value).getRepoId();
}
else if (value instanceof ReferenceListAwareEnum)
{
return ((ReferenceListAwareEnum)value).getCode();
}
else ... | if (sqlBuilt)
{
return;
}
final Operator operator = getOperator();
final String operand1ColumnName = operand1.getColumnName();
final String operand1ColumnSql = operand1Modifier.getColumnSql(operand1ColumnName);
final String operatorSql = operator.getSql();
sqlParams = new ArrayList<>();
final Stri... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\CompareQueryFilter.java | 1 |
请完成以下Java代码 | public LookupValue findById(final Object idObj)
{
if (idObj == null)
{
return null;
}
//
// Normalize the ID to Integer/String
final Object idNormalized = LookupValue.normalizeId(idObj, fetcher.isNumericKey());
if (idNormalized == null)
{
return null;
}
//
// Build the validation context
... | @Override
public @NonNull LookupValuesList findByIdsOrdered(final @NonNull Collection<?> ids)
{
final LookupDataSourceContext evalCtx = fetcher.newContextForFetchingByIds(ids)
.putShowInactive(true)
.build();
return fetcher.retrieveLookupValueByIdsInOrder(evalCtx);
}
@Override
public List<CCacheStats... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LookupDataSourceAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static ResultBody error(BaseErrorInfoInterface errorInfo) {
ResultBody rb = new ResultBody();
rb.setCode(errorInfo.getResultCode());
rb.setMessage(errorInfo.getResultMsg());
rb.setResult(null);
return rb;
}
public static ResultBody error(String code, String message) {
ResultBody rb = new ResultBo... | public static ResultBody error( String message) {
ResultBody rb = new ResultBody();
rb.setCode("-1");
rb.setMessage(message);
rb.setResult(null);
return rb;
}
@Override
public String toString() {
return JSONObject.toJSONString(this);
}
} | repos\springboot-demo-master\Exception\src\main\java\com\et\exception\config\ResultBody.java | 2 |
请完成以下Java代码 | public Map<String, Object> getCaseVariables() {
Map<String, Object> caseVariables = new HashMap<>();
if (this.queryVariables != null) {
for (VariableInstanceEntity queryVariable : queryVariables) {
if (queryVariable.getId() != null && queryVariable.getTaskId() == null) {
... | }
@Override
public void setCaseDefinitionVersion(Integer caseDefinitionVersion) {
this.caseDefinitionVersion = caseDefinitionVersion;
}
@Override
public String getCaseDefinitionDeploymentId() {
return caseDefinitionDeploymentId;
}
@Override
public void setCaseDefinitio... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\CaseInstanceEntityImpl.java | 1 |
请完成以下Java代码 | public abstract class EnumItemDictionary<E extends Enum<E>> extends CommonDictionary<EnumItem<E>>
{
@Override
protected EnumItem<E> createValue(String[] params)
{
Map.Entry<String, Map.Entry<String, Integer>[]> args = EnumItem.create(params);
EnumItem<E> nrEnumItem = new EnumItem<E>();
... | for (int i = 0; i < size; ++i)
{
int currentSize = byteArray.nextInt();
EnumItem<E> item = newItem();
for (int j = 0; j < currentSize; ++j)
{
E nr = nrArray[byteArray.nextInt()];
int frequency = byteArray.nextInt();
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\common\EnumItemDictionary.java | 1 |
请完成以下Java代码 | public static boolean equals(@Nullable final LocatorId id1, @Nullable final LocatorId id2)
{
return Objects.equals(id1, id2);
}
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public static boolean equalsByRepoId(final int repoId1, final int repoId2)
{
final int repoId1Norm = repoId1 > 0 ? repoId1 : -1;
... | public static LocatorId fromJson(final String json)
{
final String[] parts = json.split("_");
if (parts.length != 2)
{
throw new IllegalArgumentException("Invalid json: " + json);
}
final int warehouseId = Integer.parseInt(parts[0]);
final int locatorId = Integer.parseInt(parts[1]);
return ofRepoId(wa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\LocatorId.java | 1 |
请完成以下Java代码 | public HistoricCaseActivityInstanceQuery orderByHistoricCaseActivityInstanceCreateTime() {
orderBy(HistoricCaseActivityInstanceQueryProperty.CREATE);
return this;
}
public HistoricCaseActivityInstanceQuery orderByHistoricCaseActivityInstanceEndTime() {
orderBy(HistoricCaseActivityInstanceQueryProperty.... | return createdBefore;
}
public Date getCreatedAfter() {
return createdAfter;
}
public Date getEndedBefore() {
return endedBefore;
}
public Date getEndedAfter() {
return endedAfter;
}
public Boolean getEnded() {
return ended;
}
public Integer getCaseActivityInstanceState() {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricCaseActivityInstanceQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Integer getRetries() {
return retries;
}
public void setRetries(Integer retries) {
this.retries = retries;
}
@ApiModelProperty(example = "null")
public String getExceptionMessage() {
return exceptionMessage;
}
public void setExceptionMessage(String exception... | @ApiModelProperty(example = "myAdvancedCfg")
public String getAdvancedJobHandlerConfiguration() {
return advancedJobHandlerConfiguration;
}
public void setAdvancedJobHandlerConfiguration(String advancedJobHandlerConfiguration) {
this.advancedJobHandlerConfiguration = advancedJobHandlerConfi... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\management\HistoryJobResponse.java | 2 |
请完成以下Java代码 | public void setScriptIdentifier (final String ScriptIdentifier)
{
set_Value (COLUMNNAME_ScriptIdentifier, ScriptIdentifier);
}
@Override
public String getScriptIdentifier()
{
return get_ValueAsString(COLUMNNAME_ScriptIdentifier);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNA... | public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
@Override
public void setWhereClause (final String WhereClause)
{
set_Value (COLUMNNAME_WhereClause, WhereClause);
}
@Override
public String getWhereClause()
{
return get_ValueAsString(COLUMNNAME_WhereClause);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_ScriptedExportConversion.java | 1 |
请完成以下Java代码 | public void addActivity(final PPRoutingActivity activity)
{
if (!activity.getYield().isZero())
{
yield = yield.multiply(activity.getYield(), 0);
}
queuingTime = queuingTime.plus(activity.getQueuingTime());
setupTime = setupTime.plus(activity.getSetupTime());
waitingTime = waitingTime.plus(activ... | return Collectors.reducing(BigDecimal.ZERO, RoutingActivitySegmentCost::getCostAsBigDecimal, BigDecimal::add);
}
@NonNull
CostAmount cost;
@NonNull
PPRoutingActivityId routingActivityId;
@NonNull
CostElementId costElementId;
public BigDecimal getCostAsBigDecimal()
{
return cost.toBigDecimal();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\RollupWorkflow.java | 1 |
请完成以下Java代码 | public class MessageFlow extends BaseElement {
protected String name;
protected String sourceRef;
protected String targetRef;
protected String messageRef;
public MessageFlow() {}
public MessageFlow(String sourceRef, String targetRef) {
this.sourceRef = sourceRef;
this.targetRe... | public String getMessageRef() {
return messageRef;
}
public void setMessageRef(String messageRef) {
this.messageRef = messageRef;
}
public String toString() {
return sourceRef + " --> " + targetRef;
}
public MessageFlow clone() {
MessageFlow clone = new Message... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\MessageFlow.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HistoricVariableInstanceDataResource extends HistoricVariableInstanceBaseResource {
@Autowired
protected CmmnRestResponseFactory restResponseFactory;
@Autowired
protected CmmnHistoryService historyService;
@GetMapping(value = "/cmmn-history/historic-variable-instances/{varInstanceId}... | ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutputStream outputStream = new ObjectOutputStream(buffer);
outputStream.writeObject(variable.getValue());
outputStream.close();
result = buffer.toByteArray();
response.setCo... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\variable\HistoricVariableInstanceDataResource.java | 2 |
请完成以下Java代码 | final HttpSession applySessionFixation(HttpServletRequest request) {
HttpSession session = request.getSession();
String originalSessionId = session.getId();
this.logger.debug(LogMessage.of(() -> "Invalidating session with Id '" + originalSessionId + "' "
+ (this.migrateSessionAttributes ? "and" : "without") +... | if (!this.migrateSessionAttributes && !key.startsWith("SPRING_SECURITY_")) {
// Only retain Spring Security attributes
continue;
}
attributesToMigrate.put(key, session.getAttribute(key));
}
return attributesToMigrate;
}
/**
* Defines whether attributes should be migrated to a new session or not. ... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\session\SessionFixationProtectionStrategy.java | 1 |
请完成以下Java代码 | public boolean isDraft(final I_C_RfQResponse rfqResponse)
{
final String docStatus = rfqResponse.getDocStatus();
return X_C_RfQResponse.DOCSTATUS_Drafted.equals(docStatus)
|| X_C_RfQResponse.DOCSTATUS_InProgress.equals(docStatus);
}
@Override
public boolean isDraft(final I_C_RfQResponseLine rfqResponseLine... | }
@Override
public void updateQtyPromisedAndSave(final I_C_RfQResponseLine rfqResponseLine)
{
final BigDecimal qtyPromised = Services.get(IRfqDAO.class).calculateQtyPromised(rfqResponseLine);
rfqResponseLine.setQtyPromised(qtyPromised);
InterfaceWrapperHelper.save(rfqResponseLine);
}
// @Override
// public... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\impl\RfqBL.java | 1 |
请完成以下Java代码 | public SpinRuntimeException unableToReadFromReader(Exception e) {
return new SpinRuntimeException(exceptionMessage("003", "Unable to read from reader"), e);
}
public SpinDataFormatException unrecognizableDataFormatException() {
return new SpinDataFormatException(exceptionMessage("004", "No matching data fo... | @SuppressWarnings("rawtypes")
public void logDataFormatConfigurator(DataFormatConfigurator configurator) {
if (isInfoEnabled()) {
logInfo("011", "Discovered Spin data format configurator: {}[dataformat = {}]",
configurator.getClass(), configurator.getDataFormatClass().getName());
}
}
pub... | repos\camunda-bpm-platform-master\spin\core\src\main\java\org\camunda\spin\impl\logging\SpinCoreLogger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public KeyPair keyPair() {
try {
var keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(2048);
return keyPairGenerator.generateKeyPair();
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
@Bean
public RSAKey rsaKey(KeyPair keyPair) {
return new RSA... | public JWKSource<SecurityContext> jwkSource(RSAKey rsaKey) {
var jwkSet = new JWKSet(rsaKey);
return (jwkSelector, context) -> jwkSelector.select(jwkSet);
}
@Bean
public JwtDecoder jwtDecoder(RSAKey rsaKey) throws JOSEException {
return NimbusJwtDecoder
.withPublicKey(rsaKey.toRSAPublicKey())
... | repos\master-spring-and-spring-boot-main\71-spring-security\src\main\java\com\in28minutes\learnspringsecurity\jwt\JwtSecurityConfiguration.java | 2 |
请完成以下Java代码 | public class CompositeSessionAuthenticationStrategy implements SessionAuthenticationStrategy {
private final Log logger = LogFactory.getLog(getClass());
private final List<SessionAuthenticationStrategy> delegateStrategies;
public CompositeSessionAuthenticationStrategy(List<SessionAuthenticationStrategy> delegateS... | for (SessionAuthenticationStrategy delegate : this.delegateStrategies) {
if (this.logger.isTraceEnabled()) {
this.logger.trace(LogMessage.format("Preparing session with %s (%d/%d)",
delegate.getClass().getSimpleName(), ++currentPosition, size));
}
delegate.onAuthentication(authentication, request, re... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\session\CompositeSessionAuthenticationStrategy.java | 1 |
请完成以下Java代码 | public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** 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 get... | @param S_TimeType_ID
Type of time recorded
*/
public void setS_TimeType_ID (int S_TimeType_ID)
{
if (S_TimeType_ID < 1)
set_ValueNoCheck (COLUMNNAME_S_TimeType_ID, null);
else
set_ValueNoCheck (COLUMNNAME_S_TimeType_ID, Integer.valueOf(S_TimeType_ID));
}
/** Get Time Type.
@return Type of time ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_TimeType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class HealthContributorRegistryAutoConfiguration {
HealthContributorRegistryAutoConfiguration() {
}
@Bean
@ConditionalOnMissingBean(HealthContributorRegistry.class)
DefaultHealthContributorRegistry healthContributorRegistry(Map<String, HealthContributor> contributorBeans,
ObjectProvider<HealthCon... | static class ReactiveHealthContributorRegistryConfiguration {
@Bean
@ConditionalOnMissingBean(ReactiveHealthContributorRegistry.class)
DefaultReactiveHealthContributorRegistry reactiveHealthContributorRegistry(
Map<String, ReactiveHealthContributor> contributorBeans,
ObjectProvider<HealthContributorNameG... | repos\spring-boot-4.0.1\module\spring-boot-health\src\main\java\org\springframework\boot\health\autoconfigure\registry\HealthContributorRegistryAutoConfiguration.java | 2 |
请完成以下Java代码 | public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context)
{
if (context.isNoSelection())
{
return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection();
}
if (context.isMoreThanAllowedSelected(MAX_SELECTION_SIZE))
{
return Proces... | return ProcessPreconditionsResolution.accept();
}
@Override
protected String doIt() throws Exception
{
final Set<OrderId> orderIds = orderBL.getByQueryFilter(getProcessInfo().getQueryFilterOrElseFalse())
.stream()
.map(o -> OrderId.ofRepoId(o.getC_Order_ID()))
.collect(Collectors.toSet());
if (shi... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\process\C_Order_AddTo_M_ShipperTransportation.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DeviceProfileImportService extends BaseEntityImportService<DeviceProfileId, DeviceProfile, EntityExportData<DeviceProfile>> {
private final DeviceProfileService deviceProfileService;
@Override
protected void setOwner(TenantId tenantId, DeviceProfile deviceProfile, IdProvider idProvider) {
... | @Override
protected DeviceProfile deepCopy(DeviceProfile deviceProfile) {
return new DeviceProfile(deviceProfile);
}
@Override
protected void cleanupForComparison(DeviceProfile deviceProfile) {
super.cleanupForComparison(deviceProfile);
}
@Override
public EntityType getEnti... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\DeviceProfileImportService.java | 2 |
请完成以下Java代码 | public byte[] getModelEditorSourceExtra(String modelId) {
return commandExecutor.execute(new GetModelEditorSourceExtraCmd(modelId));
}
@Override
public void addCandidateStarterUser(String processDefinitionId, String userId) {
commandExecutor.execute(new AddIdentityLinkForProcessDefinitionCm... | public List<IdentityLink> getIdentityLinksForProcessDefinition(String processDefinitionId) {
return commandExecutor.execute(new GetIdentityLinksForProcessDefinitionCmd(processDefinitionId));
}
@Override
public List<ValidationError> validateProcess(BpmnModel bpmnModel) {
return commandExecut... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\RepositoryServiceImpl.java | 1 |
请完成以下Java代码 | public class Employee {
protected String firstName;
protected int id;
/**
* Gets the value of the firstName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getFirstName() {
return firstName;
}
/**
* ... | * Gets the value of the id property.
*
*/
public int getId() {
return id;
}
/**
* Sets the value of the id property.
*
*/
public void setId(int value) {
this.id = value;
}
} | repos\tutorials-master\web-modules\jee-7\src\main\java\com\baeldung\jaxws\client\Employee.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ImportConfigRepository
{
private final IBPGroupDAO groupDAO = Services.get(IBPGroupDAO.class);
public ImportConfig getForQueryOrNull(@NonNull final BPartnerQuery query)
{
final I_HC_Forum_Datenaustausch_Config configRecord = ConfigRepositoryUtil.retrieveRecordForQueryOrNull(query);
return ofRecordO... | if (municipalityBPGroupId != null)
{
final I_C_BP_Group municipalityBPartnerGroup = Check.assumeNotNull(
groupDAO.getById(municipalityBPGroupId),
"Unable to load BP_Group referenced by HC_Forum_Datenaustausch_Config.ImportedMunicipalityBP_Group_ID={}. HC_Forum_Datenaustausch_Config={}",
municipality... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\config\ImportConfigRepository.java | 2 |
请完成以下Java代码 | public class MigrationExecutorException extends AdempiereException
{
/**
*
*/
private static final long serialVersionUID = 5403917143953357678L;
private final boolean fatal;
/**
* Wrap an {@link Throwable} exception with a {@link MigrationExecutorException}
*
* @param e
*/
public MigrationExecutorE... | */
public boolean isFatal()
{
return fatal;
}
/**
* Checks if a {@link MigrationExecutorException} is fatal for an instance of {@link Throwable}.
*
* @param e
* @return boolean
*/
public static boolean isFatal(Throwable e)
{
if (e instanceof MigrationExecutorException)
{
final MigrationExecut... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\MigrationExecutorException.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int getM_Warehouse_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID);
}
@Override
public void setOpenAmt (final BigDecimal OpenAmt)
{
set_Value (COLUMNNAME_OpenAmt, OpenAmt);
}
@Override
public BigDecimal getOpenAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_OpenAmt);
r... | /**
* Status AD_Reference_ID=541890
* Reference name: C_POS_Order_Status
*/
public static final int STATUS_AD_Reference_ID=541890;
/** Drafted = DR */
public static final String STATUS_Drafted = "DR";
/** WaitingPayment = WP */
public static final String STATUS_WaitingPayment = "WP";
/** Completed = CO */
... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_Order.java | 2 |
请完成以下Java代码 | public String getSubScopeId() {
throw new UnsupportedOperationException("Not supported to get sub scope id");
}
@Override
public String getScopeType() {
throw new UnsupportedOperationException("Not supported to scope type");
}
@Override
public St... | }
return null;
}
@Override
public void setDoubleValue(Double doubleValue) {
throw new UnsupportedOperationException("Not supported to set double value");
}
@Override
public byte[] getBytes() {
throw new UnsupportedOperationException("... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delete\BatchDeleteCaseConfig.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_S_ResourceUnAvailable[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Date From.
@param DateFrom
Starting date for a range
*/
public void setDateFrom (Timestamp DateFrom)
{
set_Value (COLUMNNAME... | /** Get Resource.
@return Resource
*/
public int getS_Resource_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_ResourceUnAvailable.java | 1 |
请完成以下Java代码 | public void setQty (java.math.BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Menge.
@return Quantity
*/
@Override
public java.math.BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Gelieferte Meng... | @Override
public org.compiere.model.I_M_RMALine getRef_RMALine() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_Ref_RMALine_ID, org.compiere.model.I_M_RMALine.class);
}
@Override
public void setRef_RMALine(org.compiere.model.I_M_RMALine Ref_RMALine)
{
set_ValueFromPO(COLUMNNAME_Ref_RMALine_ID, org... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RMALine.java | 1 |
请完成以下Java代码 | public class MigrationApply extends JavaProcess
{
private int p_AD_Migration_ID = -1;
private static final String PARAM_FailOnError = "FailOnError";
private boolean p_FailOnError = true;
private static final String PARAM_AD_Migration_Operation = "AD_Migration_Operation";
private MigrationOperation p_MigrationO... | final IMigrationExecutorProvider executorProvider = Services.get(IMigrationExecutorProvider.class);
final IMigrationExecutorContext context = executorProvider.createInitialContext(getCtx());
context.setFailOnFirstError(p_FailOnError);
context.setMigrationOperation(p_MigrationOperation);
final IMigrationExecu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\MigrationApply.java | 1 |
请完成以下Java代码 | private static Instant extractAllocationDate(final I_C_AllocationHdr ah, final @NonNull InvoiceOpenRequest.DateColumn dateColumn)
{
switch (dateColumn)
{
case DateAcct:
return ah.getDateAcct().toInstant();
case DateTrx:
default:
return ah.getDateTrx().toInstant();
}
}
private static Instant e... | {
final I_C_AllocationHdr ah = line.getC_AllocationHdr();
final BigDecimal lineWriteOff = amountAccessor.getValue(line);
if (null != ah && ah.getC_Currency_ID() != invoice.getC_Currency_ID())
{
final BigDecimal lineWriteOffConv = Services.get(ICurrencyBL.class).convert(
lineWriteOff, // Amt
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\allocation\api\impl\PlainAllocationDAO.java | 1 |
请完成以下Java代码 | public String getType() {
if (type == null) {
return "esrQR";
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType... | * @return
* possible object is
* {@link String }
*
*/
public String getReferenceNumber() {
return referenceNumber;
}
/**
* Sets the value of the referenceNumber property.
*
* @param value
* allowed object is
* {@link String }
*... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\request\EsrQRType.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8080
logging:
level:
cn.javastack.springboot.ai: DEBUG
spring:
ai:
deepseek:
api-key: ${DEEPSEEK_API_KEY} # 安全起见,从系统环境变量读取
base-url: https://api.deepseek.com
chat:
options:
model: deepseek-chat
temperature: 0.5
mcp:
clie | nt:
stdio:
servers-configuration: classpath:mcp-servers-config.json
toolcallback:
enabled: true | repos\spring-boot-best-practice-master\spring-boot-ai\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setClientInfo(String name, String value) throws SQLClientInfoException
{
delegate.setClientInfo(name, value);
}
@Override
public void setClientInfo(Properties properties) throws SQLClientInfoException
{
delegate.setClientInfo(properties);
}
@Override
public String getClientInfo(String name) th... | {
return delegate.getSchema();
}
@Override
public void abort(Executor executor) throws SQLException
{
delegate.abort(executor);
}
@Override
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
{
delegate.setNetworkTimeout(executor, milliseconds);
}
@Override
public ... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\data_source\JasperJdbcConnection.java | 2 |
请完成以下Java代码 | private JsonToPdxConverter newJsonToPdxConverter() {
return new JSONFormatterJsonToPdxConverter();
}
// TODO configure via an SPI
private ObjectMapper newObjectMapper() {
return new ObjectMapper();
}
/**
* Returns a reference to the configured {@link JsonToPdxConverter} used to convert from a single object... | for (JsonNode object : asIterable(CollectionUtils.nullSafeIterator(arrayNode.elements()))) {
pdxList.add(converter.convert(object.toString()));
}
}
else if (isObject(jsonNode)) {
ObjectNode objectNode = (ObjectNode) jsonNode;
pdxList.add(getJsonToPdxConverter().convert(objectNode.toString()));
... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\data\json\converter\support\JacksonJsonToPdxConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getRoleCode() {
return roleCode;
}
public void setRoleCode(String roleCode) {
this.roleCode = roleCode;
}
/**
* 角色名称
*
* @return
*/
public String getRoleName() {
return roleName; | }
/**
* 角色名称
*
* @return
*/
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public PmsRole() {
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\entity\PmsRole.java | 2 |
请完成以下Java代码 | public void intervalRemoved(final ListDataEvent e)
{
final int index0 = e.getIndex0();
for (int i = index0; i <= e.getIndex1(); i++)
{
final SideActionsGroupPanel groupComp = (SideActionsGroupPanel)contentPanel.getComponent(index0);
contentPanel.remove(index0);
destroyGroupComponent(groupComp);
... | {
model.getGroups().addListDataListener(groupsListModelListener);
}
}
private void renderAll()
{
final ListModel<ISideActionsGroupModel> groups = model.getGroups();
for (int i = 0; i < groups.getSize(); i++)
{
final ISideActionsGroupModel group = groups.getElementAt(i);
final SideActionsGroupPanel... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\sideactions\swing\SideActionsGroupsListPanel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable ConfigDataResource getLocation() {
return this.location;
}
/**
* Return the name of the property.
* @return the property name
*/
public String getPropertyName() {
return this.propertyName;
}
/**
* Return the origin or the property or {@code null}.
* @return the property origin
*/... | * @param contributor the contributor to check
* @param name the name to check
*/
static void throwIfPropertyFound(ConfigDataEnvironmentContributor contributor, ConfigurationPropertyName name) {
ConfigurationPropertySource source = contributor.getConfigurationPropertySource();
ConfigurationProperty property = (... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\InactiveConfigDataAccessException.java | 2 |
请完成以下Java代码 | public TrustManagerFactory getTrustManagerFactory() {
return trustManagerFactory;
}
};
}
/**
* Factory method to create a new {@link SslManagerBundle} backed by the given
* {@link SslBundle} and {@link SslBundleKey}.
* @param storeBundle the SSL store bundle
* @param key the key reference
* @retu... | static SslManagerBundle from(TrustManager... trustManagers) {
Assert.notNull(trustManagers, "'trustManagers' must not be null");
KeyManagerFactory defaultKeyManagerFactory = createDefaultKeyManagerFactory();
TrustManagerFactory defaultTrustManagerFactory = createDefaultTrustManagerFactory();
return of(defaultKe... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\SslManagerBundle.java | 1 |
请完成以下Java代码 | public List<NotificationRequest> findNotificationRequestsByRuleIdAndOriginatorEntityIdAndStatus(TenantId tenantId, NotificationRuleId ruleId, EntityId originatorEntityId, NotificationRequestStatus status) {
return notificationRequestDao.findByRuleIdAndOriginatorEntityIdAndStatus(tenantId, ruleId, originatorEnti... | @Override
public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findNotificationRequestById(tenantId, new NotificationRequestId(entityId.getId())));
}
@Override
public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId ... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\notification\DefaultNotificationRequestService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SignalRestServiceImpl extends AbstractRestProcessEngineAware implements SignalRestService {
public SignalRestServiceImpl(String engineName, ObjectMapper objectMapper) {
super(engineName, objectMapper);
}
@Override
public void throwSignal(SignalDto dto) {
String name = dto.getName();
i... | if (executionId != null) {
signalEvent.executionId(executionId);
}
Map<String, VariableValueDto> variablesDto = dto.getVariables();
if (variablesDto != null) {
Map<String, Object> variables = VariableValueDto.toMap(variablesDto, getProcessEngine(), objectMapper);
signalEvent.setVariables(... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\SignalRestServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class MybatisConfigurer {
@Bean
public SqlSessionFactory sqlSessionFactoryBean(DataSource dataSource) throws Exception {
SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
factory.setDataSource(dataSource);
factory.setTypeAliasesPackage(MODEL_PACKAGE);
//配置分页插件... | factory.setMapperLocations(resolver.getResources("classpath:mapper/*.xml"));
return factory.getObject();
}
@Bean
public MapperScannerConfigurer mapperScannerConfigurer() {
MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
mapperScannerConfigurer.setSql... | repos\spring-boot-api-project-seed-master\src\main\java\com\company\project\configurer\MybatisConfigurer.java | 2 |
请完成以下Java代码 | public void reset (String groupColumnName, String functionColumnName)
{
String key = groupColumnName + DELIMITER + functionColumnName;
PrintDataFunction pdf = (PrintDataFunction)m_groupFunction.get(key);
if (pdf != null)
pdf.reset();
} // reset
/************************************************************... | }
sb.append(";Functions=");
for (int i = 0; i < m_functions.size(); i++)
{
if (i != 0)
sb.append(",");
sb.append(m_functions.get(i));
}
if (withData)
{
Iterator it = m_groupFunction.keySet().iterator();
while(it.hasNext())
{
Object key = it.next();
Object value = m_groupFunction.g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\PrintDataGroup.java | 1 |
请在Spring Boot框架中完成以下Java代码 | void setClientSettings(@Nullable HttpClientSettings clientSettings) {
this.clientSettings = clientSettings;
}
void setHttpMessageConvertersCustomizers(
@Nullable List<ClientHttpMessageConvertersCustomizer> httpMessageConvertersCustomizers) {
this.httpMessageConvertersCustomizers = httpMessageConvertersCustomi... | builder = builder.clientSettings(this.clientSettings);
}
if (this.httpMessageConvertersCustomizers != null) {
ClientBuilder clientBuilder = HttpMessageConverters.forClient();
this.httpMessageConvertersCustomizers.forEach((customizer) -> customizer.customize(clientBuilder));
builder = builder.messageConvert... | repos\spring-boot-4.0.1\module\spring-boot-restclient\src\main\java\org\springframework\boot\restclient\autoconfigure\RestTemplateBuilderConfigurer.java | 2 |
请完成以下Java代码 | public ArrayList<Integer> arrayListItemsSetting() {
for (int i = 0; i < 1000000; i++) {
list.add(i);
}
return list;
}
@Benchmark
public void arrayItemsRetrieval(Blackhole blackhole) {
for (int i = 0; i < 1000000; i++) {
int item = array[i];
... | int item = list.get(i);
blackhole.consume(item);
}
}
@Benchmark
public void arrayCloning(Blackhole blackhole) {
Integer[] newArray = array.clone();
blackhole.consume(newArray);
}
@Benchmark
public void arrayListCloning(Blackhole blackhole) {
ArrayLis... | repos\tutorials-master\core-java-modules\core-java-collections-5\src\main\java\com\baeldung\arrayandlistperformance\ArrayAndArrayListPerformance.java | 1 |
请完成以下Java代码 | public class TaxCategoryNotFoundException extends AdempiereException
{
public TaxCategoryNotFoundException(final Object documentLine, final String additionalReason)
{
super(buildMsg(documentLine, additionalReason));
}
public TaxCategoryNotFoundException(final Object documentLine)
{
super(buildMsg(documentLine... | msg.append("@NotFound@ @C_TaxCategory_ID@");
if (!Check.isEmpty(additionalReason, true))
{
msg.append(": ").append(additionalReason);
}
if (documentLine != null)
{
msg.append("\nDocument: ").append(documentLine);
}
return msg.toString();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\exceptions\TaxCategoryNotFoundException.java | 1 |
请完成以下Java代码 | public class MigratingTransitionInstanceValidationReportImpl implements MigratingTransitionInstanceValidationReport {
protected String transitionInstanceId;
protected String sourceScopeId;
protected MigrationInstruction migrationInstruction;
protected List<String> failures = new ArrayList<String>();
public ... | }
public MigrationInstruction getMigrationInstruction() {
return migrationInstruction;
}
public void addFailure(String failure) {
failures.add(failure);
}
public boolean hasFailures() {
return !failures.isEmpty();
}
public List<String> getFailures() {
return failures;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instance\MigratingTransitionInstanceValidationReportImpl.java | 1 |
请完成以下Java代码 | public boolean isValueChanged(final Object model, final String columnName)
{
return getHelperThatCanHandle(model)
.isValueChanged(model, columnName);
}
@Override
public boolean isValueChanged(final Object model, final Set<String> columnNames)
{
return getHelperThatCanHandle(model)
.isValueChanged(mode... | @Override
public Evaluatee getEvaluatee(final Object model)
{
if (model == null)
{
return null;
}
else if (model instanceof Evaluatee)
{
final Evaluatee evaluatee = (Evaluatee)model;
return evaluatee;
}
return getHelperThatCanHandle(model)
.getEvaluatee(model);
}
@Override
public boole... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\CompositeInterfaceWrapperHelper.java | 1 |
请完成以下Java代码 | public String getServerInfo()
{
return "#" + getRunCount() + " - Last=" + m_summary.toString();
}
/**
* @return the isProcessRunning
*/
@Override
public boolean isProcessRunning()
{
return importProcessorRunning;
}
/**
* @param isProcessRunning the isProcessRunning to set | */
@Override
public void setProcessRunning(boolean isProcessRunning)
{
this.importProcessorRunning = isProcessRunning;
}
/**
* @return the mImportProcessor
*/
@Override
public I_IMP_Processor getMImportProcessor()
{
return mImportProcessor;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java-legacy\org\compiere\server\ReplicationProcessor.java | 1 |
请完成以下Java代码 | private List<String> getDimensionColumnNames(final I_PA_ReportCube paReportCube)
{
final List<String> values = new ArrayList<String>();
if (paReportCube.isProductDim())
values.add("M_Product_ID");
if (paReportCube.isBPartnerDim())
values.add("C_BPartner_ID");
if (paReportCube.isProjectDim())
values.ad... | if (paReportCube.isUserElement1Dim())
values.add("UserElement1_ID");
if (paReportCube.isUserElement2Dim())
values.add("UserElement2_ID");
if (paReportCube.isSubAcctDim())
values.add("C_SubAcct_ID");
if (paReportCube.isProjectPhaseDim())
values.add("C_ProjectPhase_ID");
if (paReportCube.isProjectTask... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\cube\impl\FactAcctCubeUpdater.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setApiKey (final java.lang.String ApiKey)
{
set_Value (COLUMNNAME_ApiKey, ApiKey);
}
@Override
public java.lang.String getApiKey()
{
return get_ValueAsStri... | public int getSUMUP_CardReader_ID()
{
return get_ValueAsInt(COLUMNNAME_SUMUP_CardReader_ID);
}
@Override
public void setSUMUP_Config_ID (final int SUMUP_Config_ID)
{
if (SUMUP_Config_ID < 1)
set_ValueNoCheck (COLUMNNAME_SUMUP_Config_ID, null);
else
set_ValueNoCheck (COLUMNNAME_SUMUP_Config_ID, SUMU... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java-gen\de\metas\payment\sumup\repository\model\X_SUMUP_Config.java | 2 |
请完成以下Java代码 | public Map<String, EventResourceEntity> getResources() {
return resources;
}
@Override
public Object getPersistentState() {
Map<String, Object> persistentState = new HashMap<>();
persistentState.put("category", this.category);
persistentState.put("tenantId", tenantId);
... | public String getParentDeploymentId() {
return parentDeploymentId;
}
@Override
public void setParentDeploymentId(String parentDeploymentId) {
this.parentDeploymentId = parentDeploymentId;
}
@Override
public void setResources(Map<String, EventResourceEntity> resources) {
... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\EventDeploymentEntityImpl.java | 1 |
请完成以下Java代码 | public HelloWorld lookup() throws NamingException {
// The app name is the EAR name of the deployed EJB without .ear suffix.
// Since we haven't deployed the application as a .ear, the app name for
// us will be an empty string
final String appName = "";
final String moduleName ... | prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
prop.put(Context.PROVIDER_URL, "http-remoting://127.0.0.1:8080");
prop.put(Context.SECURITY_PRINCIPAL, "testUser");
prop.put(Context.SECURITY_CREDENTIALS, "admin1234!");
prop.put("jboss.nam... | repos\tutorials-master\spring-ejb-modules\spring-ejb-client\src\main\java\com\baeldung\ejb\client\EJBClient.java | 1 |
请完成以下Java代码 | protected void initJpa() {
super.initJpa();
if (jpaEntityManagerFactory != null) {
sessionFactories.put(EntityManagerSession.class, new SpringEntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
}
}
protected void autoDeployReso... | public void setDeploymentResources(Resource[] deploymentResources) {
this.deploymentResources = deploymentResources;
}
public ApplicationContext getApplicationContext() {
return applicationContext;
}
public void setApplicationContext(ApplicationContext applicationContext) {
thi... | repos\flowable-engine-main\modules\flowable5-spring\src\main\java\org\activiti\spring\SpringProcessEngineConfiguration.java | 1 |
请完成以下Java代码 | public void execute()
{
// Add Line
if (m_node != null && nodeToId != null)
{
final I_AD_WF_NodeNext newLine = InterfaceWrapperHelper.newInstance(I_AD_WF_NodeNext.class);
newLine.setAD_Org_ID(OrgId.ANY.getRepoId());
newLine.setAD_WF_Node_ID(m_node.getId().getRepoId());
newLine.setAD_WF_Next_I... | Services.get(IADWorkflowDAO.class).deleteNodeById(m_node.getId());
m_parent.load(m_wf.getId(), true);
}
// Delete Line
else if (m_line != null)
{
log.info("Delete Line: " + m_line);
Services.get(IADWorkflowDAO.class).deleteNodeTransitionById(m_line.getId());
m_parent.load(m_wf.getId(), true)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WFContentPanel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HistoricDetailBaseResource {
private static Map<String, QueryProperty> allowedSortProperties = new HashMap<>();
static {
allowedSortProperties.put("processInstanceId", HistoricDetailQueryProperty.PROCESS_INSTANCE_ID);
allowedSortProperties.put("time", HistoricDetailQueryProperty.T... | query.executionId(queryRequest.getExecutionId());
}
if (queryRequest.getActivityInstanceId() != null) {
query.activityInstanceId(queryRequest.getActivityInstanceId());
}
if (queryRequest.getTaskId() != null) {
query.taskId(queryRequest.getTaskId());
}
... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricDetailBaseResource.java | 2 |
请完成以下Java代码 | public Advice getAdvice() {
synchronized (this.adviceMonitor) {
if (this.interceptor == null) {
Assert.notNull(this.adviceBeanName, "'adviceBeanName' must be set for use with bean factory lookup.");
Assert.state(this.beanFactory != null, "BeanFactory must be set to resolve 'adviceBeanName'");
this.inte... | this.adviceMonitor = new Object();
this.attributeSource = this.beanFactory.getBean(this.metadataSourceBeanName,
MethodSecurityMetadataSource.class);
}
class MethodSecurityMetadataSourcePointcut extends StaticMethodMatcherPointcut implements Serializable {
@Override
public boolean matches(Method m, Class<?... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\intercept\aopalliance\MethodSecurityMetadataSourceAdvisor.java | 1 |
请完成以下Java代码 | public class MultipleSQLExecution {
private Connection connection;
public MultipleSQLExecution(Connection connection) {
this.connection = connection;
}
public boolean executeMultipleStatements() throws SQLException {
String sql = "INSERT INTO users (name, email) VALUES ('Alice', 'alic... | }
public List<User> executeMultipleSelectStatements() throws SQLException {
String sql = "SELECT * FROM users WHERE email = 'alice@example.com';" +
"SELECT * FROM users WHERE email = 'bob@example.com';";
List<User> users = new ArrayList<>();
try (Statement stateme... | repos\tutorials-master\persistence-modules\core-java-persistence-4\src\main\java\com\baeldung\sql\MultipleSQLExecution.java | 1 |
请完成以下Java代码 | public void setDeviceData(DeviceData data) {
this.deviceData = data;
try {
this.deviceDataBytes = data != null ? mapper.writeValueAsBytes(data) : null;
} catch (JsonProcessingException e) {
log.warn("Can't serialize device data: ", e);
}
}
@Schema(descrip... | public OtaPackageId getSoftwareId() {
return softwareId;
}
public void setSoftwareId(OtaPackageId softwareId) {
this.softwareId = softwareId;
}
@Schema(description = "Additional parameters of the device",implementation = com.fasterxml.jackson.databind.JsonNode.class)
@Override
... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Device.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 getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Suchschluessel.
@param Value
Suchschlues... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PricingSystem.java | 1 |
请完成以下Java代码 | public final int getResultSetHoldability() throws SQLException
{
return getStatementImpl().getResultSetHoldability();
}
@Override
public final boolean isClosed() throws SQLException
{
return closed;
}
@Override
public final void setPoolable(final boolean poolable) throws SQLException
{
getStatementImpl... | MigrationScriptFileLoggerHolder.logMigrationScript(sql);
return sqlConverted;
}
@Override
public final void commit() throws SQLException
{
if (this.ownedConnection != null && !this.ownedConnection.getAutoCommit())
{
this.ownedConnection.commit();
}
}
@Nullable
private static Trx getTrx(@NonNull fin... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\sql\impl\AbstractCStatementProxy.java | 1 |
请完成以下Java代码 | private ExceptionMatcher buildExceptionMatcher() {
if (this.exceptionEntriesConfigurer == null) {
return ExceptionMatcher.forAllowList().add(Throwable.class).build();
}
ExceptionMatcher.Builder builder = (this.exceptionEntriesConfigurer.matchIfFound)
? ExceptionMatcher.forAllowList() : ExceptionMatcher.for... | }
private static final class ExceptionEntriesConfigurer {
private final boolean matchIfFound;
private final Set<Class<? extends Throwable>> entries = new LinkedHashSet<>();
private ExceptionEntriesConfigurer(boolean matchIfFound) {
this.matchIfFound = matchIfFound;
}
}
} | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\RetryTopicConfigurationBuilder.java | 1 |
请完成以下Java代码 | public void setPromotionCode (String PromotionCode)
{
set_Value (COLUMNNAME_PromotionCode, PromotionCode);
}
/** Get Promotion Code.
@return User entered promotion code at sales time
*/
public String getPromotionCode ()
{
return (String)get_Value(COLUMNNAME_PromotionCode);
}
/** Set Usage Counter.
... | /** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionPreCondition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class ReactiveSessionConfiguration {
@Bean
SessionTimeout embeddedWebServerSessionTimeout(SessionProperties sessionProperties,
ServerProperties serverProperties) {
return () -> determineTimeout(sessionProperties, serverProperties.getReactive().getSession()::getTimeout);
}
}
/**
* Condition to... | DefaultCookieSerializerCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnMissingBean({ HttpSessionIdResolver.class, CookieSerializer.class })
static class NoComponentsAvailable {
}
@ConditionalOnBean(CookieHttpSessionIdResolver.class)
@ConditionalOnMissingBean(CookieSerializer.cla... | repos\spring-boot-4.0.1\module\spring-boot-session\src\main\java\org\springframework\boot\session\autoconfigure\SessionAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Account getTaxAccount(
@NonNull final TaxId taxId,
@NonNull final AcctSchemaId acctSchemaId,
@NonNull final PostingSign postingSign)
{
final TaxAcctType taxAcctType = postingSign.isDebit()
? TaxAcctType.TaxCredit
: TaxAcctType.TaxDue;
return taxAccountsRepository.getAccounts(taxId, acctSch... | @NonNull final Money lineAmt,
@NonNull final TaxId taxId,
final boolean isTaxIncluded)
{
//
final CurrencyId currencyId = lineAmt.getCurrencyId();
final CurrencyPrecision precision = moneyService.getStdPrecision(currencyId);
final Tax tax = taxBL.getTaxById(taxId);
final CalculateTaxResult taxResult = ... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\service\SAPGLJournalTaxProvider.java | 2 |
请完成以下Java代码 | public final void setValueAt(final Object value, final int rowModelIndex, final int columnModelIndex)
{
final TableColumnInfo columnInfo = getTableColumnInfo(columnModelIndex);
final ModelType row = getRow(rowModelIndex);
try
{
columnInfo.getWriteMethod().invoke(row, value);
}
catch (final IllegalAcces... | {
return null;
}
public List<ModelType> getSelectedRows(final ListSelectionModel selectionModel, final Function<Integer, Integer> convertRowIndexToModel)
{
final int rowMinView = selectionModel.getMinSelectionIndex();
final int rowMaxView = selectionModel.getMaxSelectionIndex();
if (rowMinView < 0 || rowMa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\swing\table\AnnotatedTableModel.java | 1 |
请完成以下Java代码 | public Collection<OnPart> getOnParts() {
return onPartCollection.get(this);
}
public IfPart getIfPart() {
return ifPartChild.getChild(this);
}
public void setIfPart(IfPart ifPart) {
ifPartChild.setChild(this, ifPart);
}
public static void registerType(ModelBuilder modelBuilder) {
ModelEle... | }
});
nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
onPartCollection = sequenceBuilder.elementCollection(OnPart.class)
.build();
ifPartChild = sequenceBuilder.element(IfPart.class)
... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\SentryImpl.java | 1 |
请完成以下Java代码 | public Date getClaimTime() {
return claimTime;
}
public void setClaimTime(Date claimTime) {
this.claimTime = claimTime;
}
@Override
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
... | }
return variables;
}
public List<HistoricVariableInstanceEntity> getQueryVariables() {
if (queryVariables == null && Context.getCommandContext() != null) {
queryVariables = new HistoricVariableInitializingList();
}
return queryVariables;
}
public void setQu... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricTaskInstanceEntity.java | 1 |
请完成以下Java代码 | public List<JsonHU> listByQRCode(@RequestBody @NonNull final JsonGetByQRCodeRequest request)
{
final String adLanguage = Env.getADLanguageOrBaseLanguage();
return handlingUnitsService.getHUsByQrCode(request, adLanguage);
}
private static @NonNull ResponseEntity<JsonGetSingleHUResponse> toBadRequestResponseEntit... | private static JsonHUType toJsonHUType(@NonNull final HUQRCodeUnitType huUnitType)
{
switch (huUnitType)
{
case LU:
return JsonHUType.LU;
case TU:
return JsonHUType.TU;
case VHU:
return JsonHUType.CU;
default:
throw new AdempiereException("Unknown HU Unit Type: " + huUnitType);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.mobileui\src\main\java\de\metas\handlingunits\rest_api\HandlingUnitsRestController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static void updateRecord(
@NonNull final I_M_Picking_Job_Step record,
@Nullable final PickingJobStepPickedTo pickedTo)
{
final BigDecimal qtyRejectedBD;
final String rejectReason;
if (pickedTo != null)
{
qtyRejectedBD = pickedTo.getQtyRejected() != null ? pickedTo.getQtyRejected().toBigDecimal... | }
private static void updateRecord(final I_M_Picking_Job_Step_HUAlternative existingRecord, final PickingJobStepPickedTo pickedTo)
{
final UomId uomId;
final BigDecimal qtyRejectedBD;
final String rejectReason;
if (pickedTo != null && pickedTo.getQtyRejected() != null)
{
final QtyRejectedWithReason qtyR... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\repository\PickingJobSaver.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean isExplicitNulls() {
return this.explicitNulls;
}
public void setExplicitNulls(boolean explicitNulls) {
this.explicitNulls = explicitNulls;
}
public boolean isCoerceInputValues() {
return this.coerceInputValues;
}
public void setCoerceInputValues(boolean coerceInputValues) {
this.coerceIn... | this.allowTrailingComma = allowTrailingComma;
}
public boolean isAllowComments() {
return this.allowComments;
}
public void setAllowComments(boolean allowComments) {
this.allowComments = allowComments;
}
/**
* Enum representing strategies for JSON property naming. The values correspond to
* {@link kotl... | repos\spring-boot-4.0.1\module\spring-boot-kotlinx-serialization-json\src\main\java\org\springframework\boot\kotlinx\serialization\json\autoconfigure\KotlinxSerializationJsonProperties.java | 2 |
请完成以下Java代码 | public PageData<EntityView> findByTenantId(UUID tenantId, PageLink pageLink) {
return findEntityViewsByTenantId(tenantId, pageLink);
}
@Override
public EntityViewId getExternalIdByInternal(EntityViewId internalId) {
return Optional.ofNullable(entityViewRepository.getExternalIdById(internalI... | @Override
public List<EntityViewFields> findNextBatch(UUID id, int batchSize) {
return entityViewRepository.findNextBatch(id, Limit.of(batchSize));
}
@Override
public List<EntityInfo> findEntityInfosByNamePrefix(TenantId tenantId, String name) {
return entityViewRepository.findEntityInf... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\entityview\JpaEntityViewDao.java | 1 |
请完成以下Java代码 | public Dimension getFromRecord(@NonNull final I_M_InOutLine record)
{
return Dimension.builder()
.projectId(ProjectId.ofRepoIdOrNull(record.getC_Project_ID()))
.campaignId(record.getC_Campaign_ID())
.activityId(ActivityId.ofRepoIdOrNull(record.getC_Activity_ID()))
.salesOrderId(OrderId.ofRepoIdOrNull... | {
record.setC_Project_ID(ProjectId.toRepoId(from.getProjectId()));
record.setC_Campaign_ID(from.getCampaignId());
record.setC_Activity_ID(ActivityId.toRepoId(from.getActivityId()));
record.setC_OrderSO_ID(OrderId.toRepoId(from.getSalesOrderId()));
record.setUserElementString1(from.getUserElementString1());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\dimension\InOutLineDimensionFactory.java | 1 |
请完成以下Java代码 | public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
name_ = value;
onChanged();
return this;
... | private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
static {
java.lang.String[] descriptorData = { "\n\017FooProtos.proto\022\010baeldung\"\037\n\003Foo\022\n\n\002id" + "\030\001 \002(\003\022\014\n\004name\030\002 \002(\tB!\n\024com.baeldung.web" + ".dtoB\tFooProtos" };
com.g... | repos\tutorials-master\spring-web-modules\spring-rest-simple\src\main\java\com\baeldung\web\dto\FooProtos.java | 1 |
请完成以下Java代码 | public void destroy() throws Exception {
// stop-schedule
JobScheduleHelper.getInstance().toStop();
// admin log report stop
JobLogReportHelper.getInstance().toStop();
// admin lose-monitor stop
JobCompleteHelper.getInstance().toStop();
// admin fail-monitor s... | private static ConcurrentMap<String, ExecutorBiz> executorBizRepository = new ConcurrentHashMap<String, ExecutorBiz>();
public static ExecutorBiz getExecutorBiz(String address) throws Exception {
// valid
if (address==null || address.trim().length()==0) {
return null;
}
... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\scheduler\XxlJobScheduler.java | 1 |
请完成以下Java代码 | public BigDecimal getPrice() {
return price;
}
public Store getStore() {
return store;
}
public void setColor(String color) {
this.color = color;
}
public void setGrade(String grade) {
this.grade = grade;
}
public void setId(Long id) {
this.id ... | }
public void setItemType(ItemType itemType) {
this.itemType = itemType;
}
public void setName(String name) {
this.name = name;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public void setStore(Store store) {
this.store = store;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-2\src\main\java\com\baeldung\boot\domain\Item.java | 1 |
请完成以下Java代码 | public abstract class AbstractTemplateFilter implements Filter {
private FilterConfig filterConfig;
@Override
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
}
@Override
public void destroy() {
filterConfig = null;
}
@Override
public ... | } catch (MalformedURLException e) {
return false;
}
}
/**
* Returns the string contents of a web resource with the given name.
*
* The resource must be static and text based.
*
* @param name the name of the resource
*
* @return the resource contents
*
* @throws IOException
*... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\filter\AbstractTemplateFilter.java | 1 |
请完成以下Java代码 | public class SuffixingRetryTopicNamesProviderFactory implements RetryTopicNamesProviderFactory {
@Override
public RetryTopicNamesProvider createRetryTopicNamesProvider(DestinationTopic.Properties properties) {
return new SuffixingRetryTopicNamesProvider(properties);
}
public static class SuffixingRetryTopicName... | public @Nullable String getClientIdPrefix(KafkaListenerEndpoint endpoint) {
return this.suffixer.maybeAddTo(endpoint.getClientIdPrefix());
}
@Override
public @Nullable String getGroup(KafkaListenerEndpoint endpoint) {
return this.suffixer.maybeAddTo(endpoint.getGroup());
}
@Override
public @Nullable... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\SuffixingRetryTopicNamesProviderFactory.java | 1 |
请完成以下Java代码 | public RefundMode extractRefundMode()
{
return RefundConfigs.extractRefundMode(refundConfigs);
}
public Optional<RefundConfig> getRefundConfigToUseProfitCalculation()
{
return getRefundConfigs()
.stream()
.filter(RefundConfig::isUseInProfitCalculation)
.findFirst();
}
/**
* With this instance'... | Check.assume(nextDate.isAfter(date), // make sure not to get stuck in an endless loop
"For the given date={}, invoiceSchedule.calculateNextDateToInvoice needs to return a nextDate that is later; nextDate={}",
date, nextDate);
date = nextDate;
}
return new NextInvoiceDate(invoiceSchedule, date);
}
@... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\RefundContract.java | 1 |
请完成以下Java代码 | public static class Builder {
private final boolean matchIfFound;
private final Set<Class<? extends Throwable>> exceptionClasses = new LinkedHashSet<>();
private boolean traverseCauses = false;
protected Builder(boolean matchIfFound) {
this.matchIfFound = matchIfFound;
}
/**
* Add an exception ty... | /**
* Specify if the matcher should traverse nested causes to check for the presence
* of a matching exception.
* @param traverseCauses whether to traverse causes
* @return {@code this}
*/
public Builder traverseCauses(boolean traverseCauses) {
this.traverseCauses = traverseCauses;
return this;
... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\ExceptionMatcher.java | 1 |
请完成以下Java代码 | private boolean matchesSavedRequest(HttpServletRequest request, @Nullable SavedRequest savedRequest) {
if (savedRequest == null) {
return false;
}
String currentUrl = UrlUtils.buildFullRequestUrl(request);
return savedRequest.getRedirectUrl().equals(currentUrl);
}
/**
* Allows selective use of saved req... | Assert.notNull(requestMatcher, "requestMatcher should not be null");
this.requestMatcher = requestMatcher;
}
/**
* Sets the {@link Consumer}, allowing customization of cookie.
* @param cookieCustomizer customize for cookie
* @since 6.4
*/
public void setCookieCustomizer(Consumer<Cookie> cookieCustomizer) ... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\savedrequest\CookieRequestCache.java | 1 |
请完成以下Java代码 | public class InStock {
private String wareHouse;
private Integer quantity;
public InStock(String wareHouse, int quantity) {
this.wareHouse = wareHouse;
this.quantity = quantity;
}
public String getWareHouse() {
return wareHouse;
}
public void setWareHouse(String w... | public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
InStock inStock = (InStock) o;
return Objects.equals(wareHouse, inStock.wareHouse) && Objects.equals(quantity, inStock.quantity);
}
@O... | repos\tutorials-master\persistence-modules\spring-data-mongodb-2\src\main\java\com\baeldung\projection\model\InStock.java | 1 |
请完成以下Spring Boot application配置 | #DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.url=jdbc:mysql://localhost:3306/myhome?useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false
spring.datasource.username=root
spring.datasource.password=posilka2020
#Hibernate
#The SQL dialect make Hibernate generate better SQL f... | lect
#Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto=update
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type=TRACE | repos\Spring-Boot-Advanced-Projects-main\Registration-FullStack-Springboot\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public boolean isUpdateRequired() {
if (StringUtils.isEmpty(targetName) || StringUtils.isEmpty(targetVersion) || !isSupported()) {
return false;
} else {
String targetPackageId = getPackageId(targetName, targetVersion);
String currentPackageId = getPackageId(currentNa... | }
@JsonIgnore
public boolean isAssigned() {
return StringUtils.isNotEmpty(targetName) && StringUtils.isNotEmpty(targetVersion);
}
public abstract void update(Result result);
protected static String getPackageId(String name, String version) {
return (StringUtils.isNotEmpty(name) ? ... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\ota\LwM2MClientOtaInfo.java | 1 |
请完成以下Java代码 | private IInvoiceCandidatesChangesChecker newInvoiceCandidatesChangesChecker()
{
if (isFailOnChanges())
{
return new InvoiceCandidatesChangesChecker()
.setTotalNetAmtToInvoiceChecksum(_totalNetAmtToInvoiceChecksum);
}
else
{
return IInvoiceCandidatesChangesChecker.NULL;
}
}
@Override
public I... | }
@Override
public IInvoiceCandidateEnqueuer setAsyncBatchId(final AsyncBatchId asyncBatchId)
{
_asyncBatchId = asyncBatchId;
return this;
}
@Override
public IInvoiceCandidateEnqueuer setPriority(final IWorkpackagePrioStrategy priority)
{
_priority = priority;
return this;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidateEnqueuer.java | 1 |
请完成以下Java代码 | public class JSONDocumentList
{
@NonNull private final List<JSONDocument> result;
@NonNull private final Set<DocumentId> missingIds;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@NonNull private final List<JSONViewOrderBy> orderBys;
@Builder(toBuilder = true)
@Jacksonized
private JSONDocumentList(
@Nullable ... | {
return this;
}
return toBuilder().missingIds(missingIdsNew).build();
}
public Set<DocumentId> computeMissingIdsFromExpectedRowIds(final DocumentIdsSelection expectedRowIds)
{
if (expectedRowIds.isEmpty() || expectedRowIds.isAll())
{
return null;
}
else
{
final ImmutableSet<DocumentId> exis... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentList.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CommentRequest {
private String id;
private String url;
private String author;
private String message;
private String type;
private boolean saveProcessInstanceId;
public void setId(String id) {
this.id = id;
}
public String getId() {
return id;
}
... | public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isSaveProcessInstanceId() {... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\engine\CommentRequest.java | 2 |
请完成以下Java代码 | public ProcessExecutor executeSync()
{
processInfo.setAsync(false); // #1160 advise the process info, that we want a synchronous execution
final ProcessExecutor worker = build();
worker.executeSync();
return worker;
}
private ProcessExecutor build()
{
try
{
prepareAD_PInstance(processInfo... | }
private IProcessExecutionListener getListener()
{
return listener;
}
/**
* Advice the executor to propagate the error in case the execution failed.
*/
public Builder onErrorThrowException()
{
this.onErrorThrowException = true;
return this;
}
public Builder onErrorThrowException(final... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessExecutor.java | 1 |
请完成以下Java代码 | public void setIsDone (boolean IsDone)
{
set_Value (COLUMNNAME_IsDone, Boolean.valueOf(IsDone));
}
/** Get Erledigt.
@return Erledigt */
@Override
public boolean isDone ()
{
Object oo = get_Value(COLUMNNAME_IsDone);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).boolean... | public java.lang.String getReason ()
{
return (java.lang.String)get_Value(COLUMNNAME_Reason);
}
/** Set Sachbearbeiter.
@param ResponsiblePerson Sachbearbeiter */
@Override
public void setResponsiblePerson (java.lang.String ResponsiblePerson)
{
set_Value (COLUMNNAME_ResponsiblePerson, ResponsiblePerson)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Rejection_Detail.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void createIssueSchedules(@NonNull final PPOrderIssuePlan plan)
{
final ArrayListMultimap<PPOrderBOMLineId, PPOrderIssueSchedule> allExistingSchedules = ppOrderIssueScheduleService.getByOrderId(plan.getOrderId())
.stream()
.collect(GuavaCollectors.toArrayListMultimapByKey(PPOrderIssueSchedule::getPpO... | final PPOrderIssueSchedule schedule = ppOrderIssueScheduleService.createSchedule(
PPOrderIssueScheduleCreateRequest.builder()
.ppOrderId(ppOrderId)
.ppOrderBOMLineId(orderBOMLineId)
.seqNo(seqNoProvider.getAndIncrement())
.productId(planStep.getProductId())
.qtyToIssue(planStep.g... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\create_job\ManufacturingJobCreateCommand.java | 2 |
请完成以下Java代码 | public static boolean isSameYear(Date date1, Date date2) {
if (date1 == null || date2 == null) {
return false;
}
Calendar calendar1 = Calendar.getInstance();
calendar1.setTime(date1);
Calendar calendar2 = Calendar.getInstance();
calendar2.setTime(date2);
... | beginCal.set(Calendar.HOUR_OF_DAY, 0);
beginCal.set(Calendar.MINUTE, 0);
beginCal.set(Calendar.SECOND, 0);
beginCal.set(Calendar.MILLISECOND, 0);
Calendar endCal = Calendar.getInstance();
endCal.setTime(end);
endCal.set(Calendar.HOUR_OF_DAY, 0);
endCal.set(Calend... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\DateUtils.java | 1 |
请完成以下Java代码 | public class Msv3SubstitutionDataPersister
{
public static Msv3SubstitutionDataPersister newInstanceWithOrgId(final OrgId orgId)
{
return new Msv3SubstitutionDataPersister(orgId);
}
@NonNull
private final OrgId orgId;
public I_MSV3_Substitution storeSubstitutionOrNull(@Nullable final OrderResponsePackageItemS... | }
public I_MSV3_Substitution storeSubstitutionOrNull(@Nullable final StockAvailabilitySubstitution substitution)
{
if (substitution == null)
{
return null;
}
final I_MSV3_Substitution substitutionRecord = newInstance(I_MSV3_Substitution.class);
substitutionRecord.setMSV3_Grund(substitution.getReason().... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\common\Msv3SubstitutionDataPersister.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private ImageCode createImageCode() {
int width = 100; // 验证码图片宽度
int height = 36; // 验证码图片长度
int length = 4; // 验证码位数
int expireIn = 60; // 验证码有效时间 60s
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
Graphics g = image.getGraphics();... | }
g.dispose();
return new ImageCode(image, sRand.toString(), expireIn);
}
private Color getRandColor(int fc, int bc) {
Random random = new Random();
if (fc > 255)
fc = 255;
if (bc > 255)
bc = 255;
int r = fc + random.nextInt(bc - fc);
... | repos\SpringAll-master\36.Spring-Security-ValidateCode\src\main\java\cc\mrbird\web\controller\ValidateController.java | 2 |
请完成以下Java代码 | public static void fillJsonTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap) {
convertersToBpmnMap.put(STENCIL_TASK_MAIL, MailTaskJsonConverter.class);
}
public static void fillBpmnTypes(
Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> conv... | ) {
ServiceTask task = new ServiceTask();
task.setType(ServiceTask.MAIL_TASK);
addField(PROPERTY_MAILTASK_TO, elementNode, task);
addField(PROPERTY_MAILTASK_FROM, elementNode, task);
addField(PROPERTY_MAILTASK_SUBJECT, elementNode, task);
addField(PROPERTY_MAILTASK_CC, el... | repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\MailTaskJsonConverter.java | 1 |
请完成以下Java代码 | public class FactAcctLogDBTableWatcher implements Runnable
{
private static final Logger logger = LogManager.getLogger(FactAcctLogDBTableWatcher.class);
private final ISysConfigBL sysConfigBL;
private final FactAcctLogService factAcctLogService;
private static final String SYSCONFIG_PollIntervalInSeconds = "de.met... | private void sleep() throws InterruptedException
{
final Duration pollInterval = getPollInterval();
logger.debug("Sleeping {}", pollInterval);
Thread.sleep(pollInterval.toMillis());
}
private Duration getPollInterval()
{
final int pollIntervalInSeconds = sysConfigBL.getIntValue(SYSCONFIG_PollIntervalInSeco... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\aggregation\FactAcctLogDBTableWatcher.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.