instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | protected AbstractResourceDefinitionManager<CamundaFormDefinitionEntity> getManager() {
return Context.getCommandContext().getCamundaFormDefinitionManager();
}
@Override
protected void checkInvalidDefinitionId(String definitionId) {
ensureNotNull("Invalid camunda form definition id", "camundaFormDefiniti... | protected void checkInvalidDefinitionByKeyVersionAndTenantId(String definitionKey, Integer definitionVersion, String tenantId, CamundaFormDefinitionEntity definition) {
ensureNotNull("no deployed camunda form definition found with key '" + definitionKey + "', version '" + definitionVersion
+ "' and tenant-i... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\deploy\cache\CamundaFormDefinitionCache.java | 1 |
请完成以下Java代码 | public void setPassword (final @Nullable java.lang.String Password)
{
set_Value (COLUMNNAME_Password, Password);
}
@Override
public java.lang.String getPassword()
{
return get_ValueAsString(COLUMNNAME_Password);
}
@Override
public void setServiceLevel (final @Nullable java.lang.String ServiceLevel)
{
... | public java.lang.String getServiceLevel()
{
return get_ValueAsString(COLUMNNAME_ServiceLevel);
}
@Override
public void setUserName (final @Nullable java.lang.String UserName)
{
set_Value (COLUMNNAME_UserName, UserName);
}
@Override
public java.lang.String getUserName()
{
return get_ValueAsString(COLU... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_Config.java | 1 |
请完成以下Java代码 | public void run() {
try {
handle();
}
catch (ConnectionClosedException ex) {
logger.debug("LiveReload connection closed");
}
catch (Exception ex) {
if (logger.isDebugEnabled()) {
logger.debug("LiveReload error", ex);
}
}
}
private void handle() throws Exception {
try {
... | finally {
removeConnection(connection);
}
}
}
/**
* {@link ThreadFactory} to create the worker threads.
*/
private static final class WorkerThreadFactory implements ThreadFactory {
private final AtomicInteger threadNumber = new AtomicInteger(1);
@Override
public Thread newThread(Runnable r) {
... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\livereload\LiveReloadServer.java | 1 |
请完成以下Java代码 | public class CartProductId implements Serializable {
@Column(name = "cart_id")
private Integer cartId;
@Column(name = "product_id")
private Integer productId;
public CartProductId() {}
public CartProductId(Integer cartId, Integer productId) {
this.cartId = cartId;
this.produc... | public Integer getProductId() {
return productId;
}
public void setProductId(Integer productId) {
this.productId = productId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof CartProductId)) return false;
CartProdu... | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\models\CartProductId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ImmutableList<CommissionConfig> createForNewCommissionInstances(@NonNull final ConfigRequestForNewInstance contractRequest)
{
final Iterator<ICommissionConfigFactory> configFactoryIterator = priorityOrderedConfigFactories.iterator();
final ImmutableList.Builder<CommissionConfig> commissionConfigCollector = ... | BPartnerId customerBPartnerId;
/**
* Needed because config settings can be specific to the product's category.
*/
@NonNull
ProductId salesProductId;
@NonNull
LocalDate commissionDate;
@NonNull
Hierarchy commissionHierarchy;
@NonNull
CommissionTriggerType commissionTriggerType;
public bool... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\services\CommissionConfigProvider.java | 2 |
请完成以下Java代码 | public class UserJWTPayload implements JWTPayload {
private final long sub;
private final String name;
private final long iat;
static UserJWTPayload of(User user, long epochSecondExpired) {
return new UserJWTPayload(user.getId(), valueOf(user.getEmail()), epochSecondExpired);
}
UserJW... | @Override
public long getUserId() {
return sub;
}
@Override
public boolean isExpired() {
return iat < now().getEpochSecond();
}
@Override
public String toString() {
return format("{\"sub\":%d,\"name\":\"%s\",\"iat\":%d}", sub, name, iat);
}
} | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\infrastructure\jwt\UserJWTPayload.java | 1 |
请完成以下Java代码 | public final class PaginatedResultsRetrievedEvent<T extends Serializable> extends ApplicationEvent {
private final UriComponentsBuilder uriBuilder;
private final HttpServletResponse response;
private final int page;
private final int totalPages;
private final int pageSize;
public PaginatedResul... | public final int getTotalPages() {
return totalPages;
}
public final int getPageSize() {
return pageSize;
}
/**
* The object on which the Event initially occurred.
*
* @return The object on which the Event initially occurred.
*/
@SuppressWarnings("unchecked")
... | repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\web\hateoas\event\PaginatedResultsRetrievedEvent.java | 1 |
请完成以下Java代码 | public void setJsonRequest (java.lang.String JsonRequest)
{
set_ValueNoCheck (COLUMNNAME_JsonRequest, JsonRequest);
}
@Override
public java.lang.String getJsonRequest()
{
return (java.lang.String)get_Value(COLUMNNAME_JsonRequest);
}
@Override
public void setJsonResponse (java.lang.String JsonResponse)
{... | set_ValueNoCheck (COLUMNNAME_PP_Cost_Collector_ImportAudit_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PP_Cost_Collector_ImportAudit_ID, Integer.valueOf(PP_Cost_Collector_ImportAudit_ID));
}
@Override
public int getPP_Cost_Collector_ImportAudit_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_Cost_Collector_Im... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector_ImportAudit.java | 1 |
请完成以下Java代码 | public class RfQEventDispacher implements IRfQEventDispacher
{
private final CompositeRfQEventListener listeners = new CompositeRfQEventListener();
@Override
public void registerListener(final IRfQEventListener listener)
{
listeners.addListener(listener);
}
@Override
public void fireBeforeComplete(final I_C_... | @Override
public void fireAfterClose(final I_C_RfQResponse rfqResponse)
{
listeners.onAfterClose(rfqResponse);
}
@Override
public void fireBeforeUnClose(I_C_RfQ rfq)
{
listeners.onBeforeUnClose(rfq);
}
@Override
public void fireAfterUnClose(I_C_RfQ rfq)
{
// TODO Auto-generated method stub
}
@Ov... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\event\impl\RfQEventDispacher.java | 1 |
请完成以下Java代码 | public boolean isOnUpdate()
{
return get_ValueAsBoolean(COLUMNNAME_OnUpdate);
}
@Override
public void setSource_Table_ID (final int Source_Table_ID)
{
if (Source_Table_ID < 1)
set_Value (COLUMNNAME_Source_Table_ID, null);
else
set_Value (COLUMNNAME_Source_Table_ID, Source_Table_ID);
}
@Override
... | {
return get_ValueAsInt(COLUMNNAME_Source_Table_ID);
}
@Override
public void setTargetRecordMappingSQL (final java.lang.String TargetRecordMappingSQL)
{
set_Value (COLUMNNAME_TargetRecordMappingSQL, TargetRecordMappingSQL);
}
@Override
public java.lang.String getTargetRecordMappingSQL()
{
return get_Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule_Trigger.java | 1 |
请完成以下Java代码 | public void afterEnqueueBeforeSave(final I_C_Printing_Queue queueItem, final I_AD_Archive printOut)
{
final int copies = orderCheckupBL.getNumberOfCopies(queueItem, printOut);
queueItem.setCopies(copies);
}
@Override
public void afterEnqueueAfterSave(final I_C_Printing_Queue queueItem, final I_AD_Archive print... | //
// Get the user that shall be used for printing.
// If there is no printing user, don't print it.
final int userToPrintId = report.getAD_User_Responsible_ID();
if (userToPrintId <= 0)
{
logger.info("Cancel from printing because there was no user to print: {}", report);
queueItem.setIsActive(false);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\ordercheckup\printing\spi\impl\OrderCheckupPrintingQueueHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OrderLineDimensionFactory implements DimensionFactory<I_C_OrderLine>
{
@Override
public String getHandledTableName()
{
return I_C_OrderLine.Table_Name;
}
@Override
@NonNull
public Dimension getFromRecord(@NonNull final I_C_OrderLine record)
{
OrderId salesOrderId = OrderId.ofRepoIdOrNull(recor... | .user2_ID(record.getUser2_ID())
.build();
}
@Override
public void updateRecord(final I_C_OrderLine record, final Dimension from)
{
record.setC_Project_ID(ProjectId.toRepoId(from.getProjectId()));
record.setC_Campaign_ID(from.getCampaignId());
record.setC_Activity_ID(ActivityId.toRepoId(from.getActivityId... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\dimension\OrderLineDimensionFactory.java | 2 |
请完成以下Java代码 | public class X_M_Label extends org.compiere.model.PO implements I_M_Label, org.compiere.model.I_Persistent
{
/**
*
*/
private static final long serialVersionUID = -1771734195L;
/** Standard Constructor */
public X_M_Label (Properties ctx, int M_Label_ID, String trxName)
{
super (ctx, M_Label_... | public void setLabel (java.lang.String Label)
{
set_Value (COLUMNNAME_Label, Label);
}
/** Get Label.
@return Label */
@Override
public java.lang.String getLabel ()
{
return (java.lang.String)get_Value(COLUMNNAME_Label);
}
/** Set Label List.
@param M_Label_ID Label List */
@Override
public voi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Label.java | 1 |
请完成以下Java代码 | public void setCacheEnabled(boolean cacheEnabled) {
this.cacheEnabled = cacheEnabled;
if (!cacheEnabled) {
this.documentCache.clear();
}
}
/**
* Whether {@link #setCacheEnabled(boolean) caching} is enabled.
*/
public boolean isCacheEnabled() {
return this.cacheEnabled;
} | @Override
public Mono<String> getDocument(String name) {
return ((isCacheEnabled()) ?
this.documentCache.computeIfAbsent(name, (k) -> this.delegate.getDocument(name).cache()) :
this.delegate.getDocument(name));
}
/**
* Remove all entries from the document cache.
*/
public void clearCache() {
this.... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\support\CachingDocumentSource.java | 1 |
请完成以下Spring Boot application配置 | server.port=8500
#\u65E5\u5FD7\u914D\u7F6E
logging.level.root=info
#application.properties\u4E2D\u7684\u914D\u7F6E\u9879\u4F18\u5148\u7EA7\u9AD8\u4E8Elogback.xml\u6587\u4EF6\u4E2D\u7684\u914D\u7F6E\u9879
logging.file=e:/ssb-student-log.log
logging.level.com.xiaolyuh=debug
logging.level.org.springframework.web=info
#\... | wait=-1
#spring.redis.sentinel.master= # name of Redis server
#spring.redis.sentinel.nodes= # comma-separated list of host:port pairs
# \u7F13\u5B58\u65F6\u95F4\u914D\u7F6E
select.cache.timeout=1800
select.cache.refresh=1790
debug=false
spring.profiles.active=dev1 | repos\spring-boot-student-master\spring-boot-student-hystrix\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public void setExternalSystem_ID (final int ExternalSystem_ID)
{
if (ExternalSystem_ID < 1)
set_Value (COLUMNNAME_ExternalSystem_ID, null);
else
set_Value (COLUMNNAME_ExternalSystem_ID, ExternalSystem_ID);
}
@Override
public int getExternalSystem_ID()
{
return get_ValueAsInt(COLUMNNAME_ExternalSyst... | @Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setValue (final java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Service.java | 1 |
请完成以下Java代码 | public void fireExternalTaskCreatedEvent(final ExternalTask externalTask) {
if (isHistoryEventProduced(HistoryEventTypes.EXTERNAL_TASK_CREATE, externalTask)) {
HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator() {
@Override
public HistoryEvent createHisto... | return producer.createHistoricExternalTaskLogDeletedEvt(externalTask);
}
});
}
}
// helper /////////////////////////////////////////////////////////
protected boolean isHistoryEventProduced(HistoryEventType eventType, ExternalTask externalTask) {
ProcessEngineConfigurationImpl configuratio... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricExternalTaskLogManager.java | 1 |
请完成以下Java代码 | void fontChanged(ActionEvent e) {
int[] sizes = {8,10,13,16,18,24,32};
int size = 16;
String face;
Font font = sample.getFont();
if (fontSizeCB.getSelectedIndex() > 0)
size = sizes[fontSizeCB.getSelectedIndex()-1];
if (fontFamilyCB.getSelectedIndex() >0)
... | UIManager.put("ColorChooser.okText", Local.getString("OK"));
UIManager.put("ColorChooser.cancelText", Local.getString("Cancel"));
UIManager.put("ColorChooser.resetText", Local.getString("Reset"));
UIManager.put("ColorChooser.hsbHueText", Local.getString("H"));
UIManager.put("ColorChooser.hsbSaturationText", Loc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\FontDialog.java | 1 |
请完成以下Java代码 | public Set<CarrierServiceId> getCarrierServicesIfLoaded()
{
if (carrierServices == null)
{
throw new AdempiereException("Carrier services were not loaded for " + this);
}
return carrierServices;
}
@Nullable
public OrderId getOrderId()
{
return getOrderAndLineId() != null ? getOrderAndLineId().getOrde... | if (nonNullTargetAsiIds.isEmpty())
{
return true; // targetAsiIds was effectively empty, so we return true
}
if (getAttributeSetInstanceId() == null)
{
return false;
}
final ImmutableAttributeSet shipmentScheduleAsi = asiBL.getImmutableAttributeSetById(getAttributeSetInstanceId());
return nonNull... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\ShipmentSchedule.java | 1 |
请完成以下Java代码 | <E extends Exception> void ensureOpen(Supplier<E> exceptionSupplier) throws E {
synchronized (this.lock) {
if (this.referenceCount == 0) {
throw exceptionSupplier.get();
}
}
}
@Override
public String toString() {
return this.path.toString();
}
}
/**
* Internal tracker used to check ... | @Override
public void openedFileChannel(Path path) {
}
@Override
public void closedFileChannel(Path path) {
}
};
void openedFileChannel(Path path);
void closedFileChannel(Path path);
}
} | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\FileDataBlock.java | 1 |
请完成以下Java代码 | public Object eval(Bindings bindings, ELContext context) {
Method method = bindings.getFunction(index);
try {
return invoke(bindings, context, null, method);
} catch (IllegalAccessException e) {
throw new ELException(LocalMessages.get("error.function.access", name), e);
... | }
public boolean isVarArgs() {
return varargs;
}
public int getParamCount() {
return params.getCardinality();
}
protected AstNode getParam(int i) {
return params.getChild(i);
}
public int getCardinality() {
return 1;
}
public AstNode getChild(int ... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstFunction.java | 1 |
请完成以下Java代码 | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public AesDesDefaultEncrypt() throws NoSuchAlgorithmException {
log.info("init encrypt by default passwd");
this.password = DEFAULT_SEC;
this.... | public String decrypt(String value) {
if (StringUtils.isEmpty(value)) {
return "";
}
try {
byte[] encryptData = Hex.hexStringToBytes(value);
Cipher cipher = Cipher.getInstance(DEFAULT_CIPHER_ALGORITHM);
cipher.init(Cipher.DECRYPT_MODE, secretKeySpe... | repos\spring-boot-quick-master\mybatis-crypt-plugin\src\main\java\com\quick\db\crypt\encrypt\AesDesDefaultEncrypt.java | 1 |
请完成以下Java代码 | public String getSerializerType() {
return serializerType;
}
public void setSerializerType(String serializerType) {
this.serializerType = serializerType;
}
public String getSerializerDelegateExpression() {
return serializerDelegateExpression;
}
public void setSerialize... | public void setPipelineDelegateExpression(String pipelineDelegateExpression) {
this.pipelineDelegateExpression = pipelineDelegateExpression;
}
public Object getOutboundEventChannelAdapter() {
return outboundEventChannelAdapter;
}
public void setOutboundEventChannelAdapter(Object outbou... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\OutboundChannelModel.java | 1 |
请完成以下Java代码 | private void addToVhusIfValid(
@NonNull final IStorageRecord storageRecord,
@NonNull final List<I_M_HU> vhus)
{
final HUStorageRecord huStorageRecord = HUStorageRecord.cast(storageRecord);
final I_M_HU vhu = huStorageRecord.getVHU();
// Skip those VHUs which are not about active HUs
// (i.e. we are ski... | final ProductId productId = huStorageRecord.getProductId();
if (!huAttributesBL.areMandatoryPickingAttributesFulfilled(huId, productId))
{
return;
}
final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class);
if (!handlingUnitsBL.isHUHierarchyCleared(HuId.ofRepoId(vhu.getM_HU_ID())))
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\impl\HUPickingSlotBLs\RetrieveAvailableHUsToPick.java | 1 |
请完成以下Java代码 | public boolean isBetaFunctionality ()
{
Object oo = get_Value(COLUMNNAME_IsBetaFunctionality);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set jsp-URL.
@param JSPURL
Web URL of the jsp function
*/
@... | /** Get Is Modal.
@return Is Modal */
@Override
public boolean isModal ()
{
Object oo = get_Value(COLUMNNAME_Modal);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Form.java | 1 |
请完成以下Java代码 | public void build()
{
markAsBuilt();
final Properties ctx = getCtx();
final JMenu menu = getMenu();
// NOTE: avoid using getWindowNo() here because in some cases it might not be available
//
// Add all custom windows to menu
for (final I_AD_InfoWindow infoWindow : Services.get(IADInfoWindowDAO.class).r... | private final JFrame getParentFrame()
{
final int parentWindowNo = getParentWindowNo();
// No windowNo => use main window
if (parentWindowNo < 0 || parentWindowNo == Env.WINDOW_None)
{
return Env.getWindow(Env.WINDOW_MAIN);
}
// Use particular window
final JFrame frame = Env.getWindow(parentWindowNo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\InfoWindowMenuBuilder.java | 1 |
请完成以下Java代码 | public CredentialsStrategy credentialsStrategy() {
return new BCryptCredentialsStrategy();
}
@Provides
public BasicPrincipalAuthenticator basicPrincipalAuthenticator(
SecuritySettings securitySettings, CredentialsStrategy credentialsStrategy,
@Named("restx.admin.passwordHash... | // the path where users are stored
Paths.get("data/users.json"),
// the path where credentials are stored. isolating both is a good practice in terms of security
// it is strongly recommended to follow this approach even if you use your own reposi... | repos\tutorials-master\web-modules\restx\src\main\java\restx\demo\AppModule.java | 1 |
请完成以下Java代码 | int getDataEntryRecordIdIndexSize()
{
return cacheIndex.size();
}
@Value(staticConstructor = "of")
private static final class CacheKey
{
int mainRecordId;
DataEntrySubTabId subTabId;
}
@ToString
@VisibleForTesting
static final class DataEntryRecordIdIndex implements CacheIndexDataAdapter<DataEntryRecor... | }
@Override
public ImmutableSet<TableRecordReference> extractRecordRefs(final DataEntryRecord dataItem)
{
final DataEntryRecordId id = dataItem.getId().orElse(null);
return id != null
? ImmutableSet.of(TableRecordReference.of(I_DataEntry_Record.Table_Name, id))
: ImmutableSet.of();
}
@Overri... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\dataentry\impl\DataEntryRecordCache.java | 1 |
请完成以下Java代码 | public String getType() {
return TYPE;
}
@Override
public void execute(JobEntity job, String configuration, VariableScope variableScope, CommandContext commandContext) {
ProcessDefinitionEntity processDefinitionEntity = ProcessDefinitionUtil
.getProcessDefinitionFromDatabas... | }
ProcessInstanceHelper processInstanceHelper = processEngineConfiguration.getProcessInstanceHelper();
processInstanceHelper.createAndStartProcessInstanceWithInitialFlowElement(processDefinitionEntity, null, null, null, flowElement, process
, null, nul... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\jobexecutor\TimerStartEventJobHandler.java | 1 |
请完成以下Java代码 | public void setValue (Object value)
{
boolean sel = false;
if (value != null)
{
if (value instanceof Boolean)
sel = ((Boolean)value).booleanValue();
else
sel = "Y".equals(value);
}
setSelected(sel);
} // setValue
/**
* Property Change Listener
* @param evt
*/
@Override
public void ... | */
@Override
public void actionPerformed(ActionEvent e)
{
try
{
fireVetoableChange(m_columnName, null, getValue());
}
catch (PropertyVetoException pve)
{
}
} // actionPerformed
/**
* Set Field/WindowNo for ValuePreference (NOP)
* @param mField
*/
@Override
public void setField (org.compie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VCheckBox.java | 1 |
请完成以下Java代码 | public void setStatementDifference (BigDecimal StatementDifference)
{
set_Value (COLUMNNAME_StatementDifference, StatementDifference);
}
/** Get Statement difference.
@return Difference between statement ending balance and actual ending balance
*/
public BigDecimal getStatementDifference ()
{
BigDecimal... | {
return (I_C_ElementValue)MTable.get(getCtx(), I_C_ElementValue.Table_Name)
.getPO(getUser2_ID(), get_TrxName()); }
/** Set User List 2.
@param User2_ID
User defined list element #2
*/
public void setUser2_ID (int User2_ID)
{
if (User2_ID < 1)
set_Value (COLUMNNAME_User2_ID, null);
else
se... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Cash.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setSetupPlaceNo(String value) {
this.setupPlaceNo = value;
}
/**
* Gets the value of the siteName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSiteName() {
return siteName;
}
/**
... | * possible object is
* {@link String }
*
*/
public String getContact() {
return contact;
}
/**
* Sets the value of the contact property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setContac... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctop119VType.java | 2 |
请完成以下Java代码 | public static final IStringExpression ofNullable(final String expressionStr)
{
return expressionStr == null ? IStringExpression.NULL : of(expressionStr);
}
private static final ImmutableMap<String, ConstantStringExpression> CACHE = ImmutableMap.<String, ConstantStringExpression> builder()
.put("", new Constant... | @Override
public String getExpressionString()
{
return expressionStr;
}
@Override
public String getFormatedExpressionString()
{
return expressionStr;
}
@Override
public Set<CtxName> getParameters()
{
return ImmutableSet.of();
}
@Override
public String evaluate(final Evaluatee ctx, final boolean ig... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\ConstantStringExpression.java | 1 |
请完成以下Java代码 | public ResponseEntity<Object> deleteDatabase(@RequestBody Set<String> ids){
databaseService.delete(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("测试数据库链接")
@ApiOperation(value = "测试数据库链接")
@PostMapping("/testConnect")
@PreAuthorize("@el.check('database:testConnect')")
public Respons... | @PreAuthorize("@el.check('database:add')")
public ResponseEntity<Object> uploadDatabase(@RequestBody MultipartFile file, HttpServletRequest request)throws Exception{
String id = request.getParameter("id");
DatabaseDto database = databaseService.findById(id);
String fileName;
if(database != null){
fileName =... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\rest\DatabaseController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserValidator implements Validator {
@Autowired
private UserService userService;
@Override
public boolean supports(Class<?> aClass) {
return User.class.equals(aClass);
}
@Override
public void validate(Object o, Errors errors) {
User user = (User) o;
Va... | }
if (userService.findByUsername(user.getUsername()) != null) {
errors.rejectValue("username", "Duplicate.userForm.username");
}
ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "NotEmpty");
if (user.getPassword().length() < 8 || user.getPassword().length() > 32... | repos\Spring-Boot-Advanced-Projects-main\login-registration-springboot-hibernate-jsp-auth\src\main\java\net\alanbinu\springboot\loginregistrationspringbootauthjsp\validator\UserValidator.java | 2 |
请完成以下Java代码 | public static String addOneDayCalendar(String date) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.setTime(sdf.parse(date));
c.add(Calendar.DATE, 1);
return sdf.format(c.getTime());
}
public stati... | .now()
.toString();
log.info("Current date = " + date);
String incrementedDateJava8 = DateIncrementer.addOneDay(date);
log.info("Date incremented by one day using (Java 8): " + incrementedDateJava8);
String incrementedDateJodaTime = DateIncrementer.addOneDayJodaTime(date);
... | repos\tutorials-master\core-java-modules\core-java-date-operations-4\src\main\java\com\baeldung\datetime\modify\DateIncrementer.java | 1 |
请完成以下Java代码 | public class ProductInfo {
private String id;
private String msrp;
private String cost;
public ProductInfo() {
}
public ProductInfo(String cost, String msrp) {
this.msrp = msrp;
this.cost = cost;
}
@DynamoDBHashKey
@DynamoDBAutoGeneratedKey
public String getId... | return msrp;
}
@DynamoDBAttribute
public String getCost() {
return cost;
}
public void setId(String id) {
this.id = id;
}
public void setMsrp(String msrp) {
this.msrp = msrp;
}
public void setCost(String cost) {
this.cost = cost;
}
} | repos\tutorials-master\aws-modules\aws-dynamodb\src\main\java\com\baeldung\dynamodb\entity\ProductInfo.java | 1 |
请完成以下Java代码 | public void fillReport() {
try {
jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, dataSource.getConnection());
} catch (JRException | SQLException ex) {
Logger.getLogger(SimpleReportFiller.class.getName()).log(Level.SEVERE, null, ex);
}
}
publ... | public void setParameters(Map<String, Object> parameters) {
this.parameters = parameters;
}
public String getReportFileName() {
return reportFileName;
}
public void setReportFileName(String reportFileName) {
this.reportFileName = reportFileName;
}
public JasperPrint ge... | repos\tutorials-master\libraries-reporting\src\main\java\com\baeldung\jasperreports\SimpleReportFiller.java | 1 |
请完成以下Java代码 | protected boolean beforeSave (boolean newRecord)
{
// Amount
if (getPriceEntered().signum() == 0)
{
throw new FillMandatoryException("PriceEntered");
}
return true;
} // beforeSave
/**
* After Save.
* Update Header
* @param newRecord new
* @param success success
* @return success
*/ | @Override
protected boolean afterSave (boolean newRecord, boolean success)
{
if (success)
{
String sql = "UPDATE C_InvoiceBatch h "
+ "SET DocumentAmt = COALESCE((SELECT SUM(LineTotalAmt) FROM C_InvoiceBatchLine l "
+ "WHERE h.C_InvoiceBatch_ID=l.C_InvoiceBatch_ID AND l.IsActive='Y'),0) "
+ "WHERE... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MInvoiceBatchLine.java | 1 |
请完成以下Java代码 | public @Nullable String getGroupId() {
return this.groupId;
}
/**
* Return the artifact ID of the coordinates.
* @return the artifact ID
*/
@Override
public @Nullable String getArtifactId() {
return this.artifactId;
}
/**
* Return the version of the coordinates.
* @return the version | */
@Override
public @Nullable String getVersion() {
return this.version;
}
/**
* Return the coordinates in the form {@code groupId:artifactId:version}.
*/
@Override
public String toString() {
return LibraryCoordinates.toStandardNotationString(this);
}
} | repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\DefaultLibraryCoordinates.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void savaListDate(List<RpAccountCheckMistakeScratchPool> scratchPoolList) {
for (RpAccountCheckMistakeScratchPool record : scratchPoolList) {
rpAccountCheckMistakeScratchPoolDao.insert(record);
}
}
@Override
public void updateData(RpAccountCheckMistakeScratchPool RpAccountCheckMistakeScratchPool) {
... | for (RpAccountCheckMistakeScratchPool record : scratchPoolList) {
rpAccountCheckMistakeScratchPoolDao.delete(record.getId());
}
}
/**
* 查询出缓存池中所有的数据
*
* @return
*/
public List<RpAccountCheckMistakeScratchPool> listScratchPoolRecord(Map<String, Object> paramMap) {
if (paramMap == null) {
paramMap... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\service\impl\RpAccountCheckMistakeScratchPoolServiceImpl.java | 2 |
请完成以下Java代码 | public void setC_Async_Batch(final de.metas.async.model.I_C_Async_Batch C_Async_Batch)
{
set_ValueFromPO(COLUMNNAME_C_Async_Batch_ID, de.metas.async.model.I_C_Async_Batch.class, C_Async_Batch);
}
@Override
public void setC_Async_Batch_ID (final int C_Async_Batch_ID)
{
if (C_Async_Batch_ID < 1)
set_ValueNo... | {
return get_ValueAsPO(COLUMNNAME_C_Queue_PackageProcessor_ID, de.metas.async.model.I_C_Queue_PackageProcessor.class);
}
@Override
public void setC_Queue_PackageProcessor(final de.metas.async.model.I_C_Queue_PackageProcessor C_Queue_PackageProcessor)
{
set_ValueFromPO(COLUMNNAME_C_Queue_PackageProcessor_ID, de... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_RV_Async_batch_statistics.java | 1 |
请完成以下Java代码 | public class Person {
private UUID id;
private String firstName;
private String lastName;
public Person(){}
public Person(String firstName, String lastName) {
this.id = UUID.randomUUID();
this.firstName = firstName;
this.lastName = lastName;
}
public String getFir... | this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public UUID getId() {
return id;
}
} | repos\tutorials-master\video-tutorials\jackson-annotations-video\src\main\java\com\baeldung\jacksonannotation\domain\Person.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static ClientKeyStore loadClientKeyStore(InputStream keyStoreStream, String keyStorePass, String privateKeyPass){
try{
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
KeyStore ks = KeyStore.getInstance("JKS");
ks.load(keyStoreStream, keyStorePass.toCharArray());
kmf... | return null;
}
}
public static TrustKeyStore loadTrustKeyStore(InputStream keyStoreStream, String keyStorePass){
try{
TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
KeyStore ks = KeyStore.getInstance("JKS");
ks.load(keyStoreStream, keyStorePass.toCharArray... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\httpclient\SimpleHttpUtils.java | 2 |
请完成以下Java代码 | private Object createItemHashKey(@NonNull final ItemType item)
{
final Function<ItemType, Object> itemAggregationKeyBuilder = getItemAggregationKeyBuilder();
final Object itemHashKey = itemAggregationKeyBuilder.apply(item);
return itemHashKey;
}
/**
* Creates a new group based on given item and adds it to g... | {
continue;
}
// Skip the excepted group
if (group == exceptGroup)
{
continue;
}
closeGroupAndCollect(group);
groups.remove();
}
}
/**
* @return how many groups were created
*/
public final int getGroupsCount()
{
return _countGroups;
}
/**
* @return how many items were a... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\MapReduceAggregator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class C_BPartner_QuickInput
{
private final ILocationDAO locationDAO = Services.get(ILocationDAO.class);
private final BPartnerQuickInputService bpartnerQuickInputService;
public C_BPartner_QuickInput(
@NonNull final BPartnerQuickInputService bpartnerQuickInputService)
{
this.bpartnerQuickInputService ... | if (userHasOrgPermissions)
{
record.setAD_Org_ID(orgInChangeId.getRepoId());
}
}
@Nullable
private OrgId getOrgInChangeViaLocationPostalCode(final @NonNull I_C_BPartner_QuickInput record)
{
final LocationId locationId = LocationId.ofRepoIdOrNull(record.getC_Location_ID());
if (locationId == null)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\quick_input\callout\C_BPartner_QuickInput.java | 2 |
请完成以下Java代码 | class Numbers {
private static final List<Integer> NUMBER_LIST = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
private Numbers() {
}
public static Iterator<Integer> iterator() {
return new PrimeIterator();
}
private static class PrimeIterator implements Iterator<Integer> {
p... | return false;
}
for (int i = cursor; i < NUMBER_LIST.size(); i++) {
if (isPrime(NUMBER_LIST.get(i))) {
cursor = i;
return true;
}
}
return false;
}
private boolean isPrime(int numbe... | repos\tutorials-master\core-java-modules\core-java-collections-2\src\main\java\com\baeldung\collections\iterator\Numbers.java | 1 |
请完成以下Java代码 | private boolean isNewDocumentNo()
{
final String oldDocumentNo = getOldDocumentNo();
if (oldDocumentNo == null)
{
return true;
}
if (IPreliminaryDocumentNoBuilder.hasPreliminaryMarkers(oldDocumentNo))
{
return true;
}
return false;
}
@Override
public IPreliminaryDocumentNoBuilder setDocument... | }
private Object getDocumentModel()
{
Check.assumeNotNull(_documentModel, "_documentModel not null");
return _documentModel;
}
private java.util.Date getDocumentDate(final String dateColumnName)
{
final Object documentModel = getDocumentModel();
final Optional<java.util.Date> date = InterfaceWrapperHelpe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\sequence\impl\PreliminaryDocumentNoBuilder.java | 1 |
请完成以下Java代码 | public class CaseTask extends ChildTask {
protected String caseRef;
protected String caseRefExpression;
protected Boolean fallbackToDefaultTenant;
protected boolean sameDeployment;
protected String caseInstanceIdVariableName;
public String getCaseRef() {
return caseRef;
}
publ... | }
public void setSameDeployment(boolean sameDeployment) {
this.sameDeployment = sameDeployment;
}
public String getCaseInstanceIdVariableName() {
return caseInstanceIdVariableName;
}
public void setCaseInstanceIdVariableName(String caseInstanceIdVariableName) {
this.caseIn... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CaseTask.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setPassword(String password) {
this.password = password;
}
public String getDefaultFrom() {
return defaultFrom;
}
public void setDefaultFrom(String defaultFrom) {
this.defaultFrom = defaultFrom;
}
public String getForceTo() {
return forceTo;
}
... | public void setDefaultCharset(Charset defaultCharset) {
this.defaultCharset = defaultCharset;
}
public boolean isUseSsl() {
return useSsl;
}
public void setUseSsl(boolean useSsl) {
this.useSsl = useSsl;
}
public boolean isUseTls() {
return useTls;
}
pu... | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\FlowableMailProperties.java | 2 |
请完成以下Java代码 | public class EmailController {
private final JavaMailSender javaMailSender;
private final MailProperties mailProperties;
@RequestMapping("/sendEmail")
@ResponseBody
public boolean sendEmail(@RequestParam("email") String email,
@RequestParam("text") String text) {
... | mimeMessageHelper.addAttachment("附件",
new ClassPathResource(attachmentClassPath));
return msg;
}
/**
* 创建简单邮件
* @param email
* @param text
* @return
*/
private SimpleMailMessage createSimpleMsg(String email, String text) {
SimpleMailMessage msg = new... | repos\spring-boot-best-practice-master\spring-boot-mail\src\main\java\cn\javastack\springboot\mail\EmailController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public LoggingProperties getLogging() {
return this.logging;
}
public ManagementProperties getManagement() {
return this.management;
}
public ManagerProperties getManager() {
return this.manager;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
p... | public PoolProperties getPool() {
return this.pool;
}
public SecurityProperties getSecurity() {
return this.security;
}
public ServiceProperties getService() {
return this.service;
}
public boolean isUseBeanFactoryLocator() {
return this.useBeanFactoryLocator;
}
public void setUseBeanFactoryLocator(... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\GemFireProperties.java | 2 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCoverPic() {
return coverPic;
}
public voi... | return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ")... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsAlbum.java | 1 |
请完成以下Java代码 | public LookupDataSourceContext.Builder newContextForFetchingById(final Object id)
{
return delegate.newContextForFetchingById(id);
}
@Override
public LookupValue retrieveLookupValueById(final @NonNull LookupDataSourceContext evalCtx)
{
return cache_retrieveLookupValueById.getOrLoad(evalCtx, () -> delegate.ret... | return delegate.newContextForFetchingList();
}
@Override
public LookupValuesPage retrieveEntities(final LookupDataSourceContext evalCtx)
{
return cache_retrieveEntities.getOrLoad(evalCtx, delegate::retrieveEntities);
}
@Override
public Optional<WindowId> getZoomIntoWindowId()
{
return delegate.getZoomInto... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\CachedLookupDataSourceFetcherAdapter.java | 1 |
请完成以下Spring Boot application配置 | logging:
level:
org.springframework.security: INFO
hystrix:
command:
default:
execution:
isolation:
thread:
timeoutInMilliseconds: 10000
eureka:
instance:
prefer-ip-address: true
client:
serviceUrl:
defaultZone: http://registry:8761/eureka/
se | curity:
oauth2:
resource:
user-info-uri: http://auth-service:5000/uaa/users/current
spring:
rabbitmq:
host: rabbitmq | repos\piggymetrics-master\config\src\main\resources\shared\application.yml | 2 |
请完成以下Java代码 | public int compare(Map.Entry<K, V> o1, Map.Entry<K, V> o2)
{
if (desc) return o2.getValue().compareTo(o1.getValue());
return o1.getValue().compareTo(o2.getValue());
}
});
for (Map.Entry<K, V> entry : entryList)
{
output.put(entr... | System.arraycopy(src, output[0].length, output[1], 0, output[1].length);
return output;
}
/**
* 分割Map,其中旧map直接被改变
* @param src
* @param rate
* @return
*/
public static Map<String, String[]> splitMap(Map<String, String[]> src, double rate)
{
assert 0 <= rate && r... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\utilities\CollectionUtility.java | 1 |
请完成以下Java代码 | public void sendMessageWithAttachment(String to,
String subject,
String text,
String pathToAttachment) {
try {
MimeMessage message = emailSender.createMimeMessage();
// pass 'true' to the constructor to create a multipart message
MimeMessageHelper help... | helper.setFrom(NOREPLY_ADDRESS);
helper.setTo(to);
helper.setSubject(subject);
helper.setText(text);
// Add the attachment from InputStream
helper.addAttachment(attachmentName, new InputStreamResource(attachmentStream));
emailSender.send(message)... | repos\tutorials-master\spring-web-modules\spring-mvc-basics\src\main\java\com\baeldung\spring\mail\EmailServiceImpl.java | 1 |
请完成以下Java代码 | public class C_Invoice_Candidate_Close extends JavaProcess implements IProcessPrecondition
{
private final transient IQueryBL queryBL = Services.get(IQueryBL.class);
private final transient IInvoiceCandBL invoiceCandBL = Services.get(IInvoiceCandBL.class);
@Override
public ProcessPreconditionsResolution checkPreco... | invoiceCandBL.closeInvoiceCandidates(selectedCandidates);
return MSG_OK;
}
private Iterator<I_C_Invoice_Candidate> retrieveSelectedCandidates()
{
final ProcessInfo processInfo = getProcessInfo();
final IQueryFilter<I_C_Invoice_Candidate> userSelectionFilter = processInfo.getQueryFilterOrElseFalse();
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\process\C_Invoice_Candidate_Close.java | 1 |
请完成以下Java代码 | public boolean isCmmnEnabled() {
return cmmnEnabled;
}
public void setCmmnEnabled(boolean cmmnEnabled) {
this.cmmnEnabled = cmmnEnabled;
}
public boolean isDmnEnabled() {
return dmnEnabled;
}
public void setDmnEnabled(boolean dmnEnabled) {
this.dmnEnabled = dmnEnabled;
}
public void ... | this.databaseTablePrefix = databaseTablePrefix;
}
public String getDatabaseTablePrefix() {
return databaseTablePrefix;
}
public String getDatabaseSchema() {
return databaseSchema;
}
public void setDatabaseSchema(String databaseSchema) {
this.databaseSchema = databaseSchema;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\sql\DbSqlSessionFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setFlushMode(FlushMode flushMode) {
Assert.notNull(flushMode, "flushMode must not be null");
this.flushMode = flushMode;
}
protected FlushMode getFlushMode() {
return this.flushMode;
}
public void setSaveMode(SaveMode saveMode) {
Assert.notNull(saveMode, "saveMode must not be null");
this.sa... | }
@Autowired(required = false)
public void setSessionRepositoryCustomizer(
ObjectProvider<SessionRepositoryCustomizer<T>> sessionRepositoryCustomizers) {
this.sessionRepositoryCustomizers = sessionRepositoryCustomizers.orderedStream().collect(Collectors.toList());
}
protected List<SessionRepositoryCustomizer... | repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\http\AbstractRedisHttpSessionConfiguration.java | 2 |
请完成以下Java代码 | public void interrupt() {
super.interrupt();
isWorking = false;
}
}
protected boolean isWorking;
protected WorkerThread workerThread;
protected int timeout;
protected Object value;
public MultiWorker() {
setTimeout(-1);
}
public abstract void start();
public int getTimeout() {
return t... | setTimeout(timeout);
waitForComplete();
}
public void stop() {
workerThread.interrupt();
}
public void waitForComplete() {
boolean to = getTimeout() > -1;
int c = 0;
int i = 1000;
while(isWorking()) {
try {
Thread.sleep(i);
c+= to ? c+=i : -1;
}
catch(Exception ... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\tools\worker\MultiWorker.java | 1 |
请完成以下Java代码 | private JsonDataEntryLine toJsonDataEntryLine(
@NonNull final DataEntryLine layoutLine,
@NonNull final DataEntryRecord dataEntryRecord)
{
final ImmutableList<JsonDataEntryField> fields = toJsonDataEntryFields(layoutLine, dataEntryRecord);
return JsonDataEntryLine.builder()
.fields(fields)
.build();
... | final Object fieldValue = dataEntryRecord.getFieldValue(layoutField.getId()).orElse(null);
return JsonDataEntryField.builder()
.id(layoutField.getId())
.caption(layoutField.getCaption().translate(adLanguage))
.description(layoutField.getDescription().translate(adLanguage))
.type(JsonFieldType.getBy(l... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\dataentry\impl\JsonDataEntryFactory.java | 1 |
请完成以下Java代码 | public long getInterval() {
if (intervalType == null) {
return 0L;
} else {
switch (intervalType) {
case WEEK:
case WEEK_ISO:
return TimeUnit.DAYS.toMillis(7);
case MONTH:
return TimeUnit.DAYS... | }
}
private static ZoneId getZoneId(String tzIdStr) {
if (StringUtils.isEmpty(tzIdStr)) {
return ZoneId.systemDefault();
}
try {
return ZoneId.of(tzIdStr, TZ_LINKS);
} catch (DateTimeException e) {
log.warn("[{}] Failed to convert the time zon... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\kv\AggregationParams.java | 1 |
请完成以下Java代码 | public class X_C_ConversionType extends org.compiere.model.PO implements I_C_ConversionType, org.compiere.model.I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1039489159L;
/** Standard Constructor */
public X_C_ConversionType (Properties ctx, int C_ConversionType_ID, String trxNam... | public java.lang.String getDescription ()
{
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ConversionType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void hideColumn(final CellRef cellRef)
{
final Transformer transformer = getTransformer();
if (transformer instanceof PoiTransformer)
{
final PoiTransformer poiTransformer = (PoiTransformer)transformer;
final Workbook poiWorkbook = poiTransformer.getWorkbook();
if (poiWorkbook == null)
{
... | final AreaRef areaRef = getArea().getAreaRef();
final CellRef areaFirstCell = areaRef.getFirstCellRef();
final CellRef areaLastCell = areaRef.getLastCellRef();
final int firstColumn = Math.min(areaFirstCell.getCol(), areaLastCell.getCol());
final int lastColumn = Math.max(areaFirstCell.getCol(), areaLastCel... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\xls\engine\HideColumnIfCommand.java | 2 |
请完成以下Java代码 | public void setModerationType (java.lang.String ModerationType)
{
set_Value (COLUMNNAME_ModerationType, ModerationType);
}
/** Get Moderation Type.
@return Type of moderation
*/
@Override
public java.lang.String getModerationType ()
{
return (java.lang.String)get_Value(COLUMNNAME_ModerationType);
}
... | 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 ()
{
Integer ii... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Chat.java | 1 |
请完成以下Java代码 | public Builder setSearchFields(final Collection<? extends IUserQueryField> searchFields)
{
this.searchFields = (Collection<IUserQueryField>)searchFields;
return this;
}
private Collection<IUserQueryField> getSearchFields()
{
Check.assumeNotNull(searchFields, "searchFields not null");
return searchF... | }
public Builder setAD_User_ID(final int adUserId)
{
this.adUserId = adUserId;
return this;
}
public Builder setAD_User_ID_Any()
{
this.adUserId = -1;
return this;
}
private int getAD_User_ID()
{
Check.assumeNotNull(adUserId, "Parameter adUserId is not null");
return adUserId;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\apps\search\UserQueryRepository.java | 1 |
请完成以下Spring Boot application配置 | management:
endpoints:
# Actuator HTTP 配置项,对应 WebEndpointProperties 配置类
web:
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
spring:
application:
name: demo-application # 应用名
# Spring Security 配置项,对应 SecurityProperties 配置类
security:
# 配置默认的 InMemoryUs... |
instance:
metadata:
user.name: ${spring.security.user.name} # Actuator 端点的认证账号
user.password: ${spring.security.user.password} # Actuator 端点的认证密码
server:
port: 18080 # 设置自定义 Server 端口,避免和 Spring Boot Admin Server 端口冲突。 | repos\SpringBoot-Labs-master\lab-35\lab-35-admin-03-demo-application\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public TbCacheTransaction<K, V> newTransactionForKey(K key) {
return newTransaction(Collections.singletonList(key));
}
@Override
public TbCacheTransaction<K, V> newTransactionForKeys(List<K> keys) {
return newTransaction(keys);
}
void doPutIfAbsent(K key, V value) {
cache.p... | } finally {
lock.unlock();
}
}
private void removeTransaction(UUID id) {
CaffeineTbCacheTransaction<K, V> transaction = transactions.remove(id);
if (transaction != null) {
for (var key : transaction.getKeys()) {
Set<UUID> transactions = objectTran... | repos\thingsboard-master\common\cache\src\main\java\org\thingsboard\server\cache\CaffeineTbTransactionalCache.java | 1 |
请完成以下Java代码 | public int hashCode()
{
return Objects.hash(name, value, expression, usedParameters);
}
@Override
public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
if (obj == null)
{
return false;
}
if (!LogicExpressionResult.class.isAssignableFrom(obj.getClass()))
{
return f... | /**
* @return which parameters were used while evaluating and which was their value
*/
public Map<CtxName, String> getUsedParameters()
{
return usedParameters == null ? ImmutableMap.of() : usedParameters;
}
private static final class Constant extends LogicExpressionResult
{
private Constant(final boolean ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\LogicExpressionResult.java | 1 |
请完成以下Java代码 | public String getDeliveryNote()
{
return get_ValueAsString(COLUMNNAME_DeliveryNote);
}
@Override
public void setEndDate (final @Nullable java.sql.Timestamp EndDate)
{
set_Value (COLUMNNAME_EndDate, EndDate);
}
@Override
public java.sql.Timestamp getEndDate()
{
return get_ValueAsTimestamp(COLUMNNAME_En... | {
set_Value (COLUMNNAME_IsSeriesOrder, IsSeriesOrder);
}
@Override
public boolean isSeriesOrder()
{
return get_ValueAsBoolean(COLUMNNAME_IsSeriesOrder);
}
@Override
public void setNextDelivery (final @Nullable java.sql.Timestamp NextDelivery)
{
set_Value (COLUMNNAME_NextDelivery, NextDelivery);
}
@O... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_Alberta_Order.java | 1 |
请完成以下Java代码 | private void pack()
{
final ImmutableList<WebuiPickHUResult> result = rowsService.setPackingInstruction(getValidRowsForPickAndPack(), getPackToSpec());
updateViewRowFromPickingCandidate(result);
}
private List<ProductsToPickRow> getValidRowsForPickAndPack()
{
return getSelectedRows()
.stream()
.filt... | {
final I_M_HU_PI defaultPIForPicking = handlingUnitsDAO.retrievePIDefaultForPicking();
if (defaultPIForPicking == null)
{
throw new AdempiereException(MSG_SET_DEFAULT_PACKING_INSTRUCTION);
}
return PackToSpec.ofGenericPackingInstructionsId(HuPackingInstructionsId.ofRepoId(defaultPIForPicking.getM_HU_PI_I... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_PickAndPackSelected.java | 1 |
请完成以下Java代码 | public BigDecimal getQty()
{
return qty;
}
public Timestamp getDateOrdered()
{
return dateOrdered;
}
/**
* @return locator where Quantity currently is
*/
public I_M_Locator getM_Locator()
{
return locator;
}
public DistributionNetworkLine getDD_NetworkDistributionLine()
{
loadIfNeeded();
ret... | public I_M_Locator getRawMaterialsLocator()
{
loadIfNeeded();
return rawMaterialsLocator;
}
public OrgId getOrgId()
{
loadIfNeeded();
return orgId;
}
public BPartnerLocationId getOrgBPLocationId()
{
loadIfNeeded();
return orgBPLocationId;
}
public UserId getPlannerId()
{
loadIfNeeded();
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\process\RawMaterialsReturnDDOrderLineCandidate.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_TaxPostal[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_C_Tax getC_Tax() throws RuntimeException
{
return (I_C_Tax)MTable.get(getCtx(), I_C_Tax.Table_Name)
.getPO(getC_Tax_ID(), get_TrxName())... | @param Postal
Postal code
*/
public void setPostal (String Postal)
{
set_Value (COLUMNNAME_Postal, Postal);
}
/** Get ZIP.
@return Postal code
*/
public String getPostal ()
{
return (String)get_Value(COLUMNNAME_Postal);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxPostal.java | 1 |
请完成以下Java代码 | public DataFetcherResult<Article> getCommentArticle(
DataFetchingEnvironment dataFetchingEnvironment) {
CommentData comment = dataFetchingEnvironment.getLocalContext();
User current = SecurityUtil.getCurrentUser().orElse(null);
ArticleData articleData =
articleQueryService
.findByI... | private DefaultPageInfo buildArticlePageInfo(CursorPager<ArticleData> articles) {
return new DefaultPageInfo(
articles.getStartCursor() == null
? null
: new DefaultConnectionCursor(articles.getStartCursor().toString()),
articles.getEndCursor() == null
? null
... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\graphql\ArticleDatafetcher.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPrev()
{
return prev;
}
public void setPrev(String prev)
{
this.prev = prev;
}
public DisputeSummaryResponse total(Integer total)
{
this.total = total;
return this;
}
/**
* This integer value is the total number of payment disputes that matched the input criteria. If the total nu... | public int hashCode()
{
return Objects.hash(href, limit, next, offset, paymentDisputeSummaries, prev, total);
}
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class DisputeSummaryResponse {\n");
sb.append(" href: ").append(toIndentedString(href)).append("\n");
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\DisputeSummaryResponse.java | 2 |
请完成以下Java代码 | public static Iterator<WorkQueue> loadQueue(final int dlm_Partition_ID, final IContextAware contextAware)
{
final IQueryBL queryBL = Services.get(IQueryBL.class);
final Iterator<I_DLM_Partition_Workqueue> iterator = queryBL.createQueryBuilder(I_DLM_Partition_Workqueue.class, contextAware)
.addOnlyActiveRecords... | @Override
public WorkQueue next()
{
return WorkQueue.of(iterator.next());
}
@Override
public String toString()
{
return "PartitionerTools.loadQueue() [dlm_Partition_ID=" + dlm_Partition_ID + "; iterator=" + iterator + "]";
}
};
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\impl\PartitionerTools.java | 1 |
请完成以下Java代码 | private static String createRequestURL(
@NonNull final PostgRESTConfig config,
@NonNull final String jsonPath)
{
final StringBuilder result = new StringBuilder(config.getBaseURL());
if (!config.getBaseURL().endsWith("/") && !jsonPath.startsWith("/"))
{
result.append("/");
}
result.append(jsonPath);
... | protected final boolean isCalledViaAPI()
{
return ProcessCalledFrom.API.equals(getProcessInfo().getProcessCalledFrom());
}
@Value
@Builder
protected static class CustomPostgRESTParameters
{
boolean storeJsonFile;
/**
* Expect one object from postgREST, not an array. Fail if there are zero or more than ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\postgrest\process\PostgRESTProcessExecutor.java | 1 |
请完成以下Java代码 | public static List<EnumItem<NR>> roleObserve(List<Vertex> wordSegResult)
{
List<EnumItem<NR>> tagList = new LinkedList<EnumItem<NR>>();
Iterator<Vertex> iterator = wordSegResult.iterator();
iterator.next();
tagList.add(new EnumItem<NR>(NR.A, NR.K)); // 始##始 A K
while (iterat... | }
}
tagList.add(nrEnumItem);
}
return tagList;
}
/**
* 维特比算法求解最优标签
* @param roleTagList
* @return
*/
public static List<NR> viterbiCompute(List<EnumItem<NR>> roleTagList)
{
return Viterbi.computeEnum(roleTagList, PersonDictionary.trans... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\recognition\nr\PersonRecognition.java | 1 |
请完成以下Java代码 | public B setting(String name, Object value) {
Assert.hasText(name, "name cannot be empty");
Assert.notNull(value, "value cannot be null");
getSettings().put(name, value);
return getThis();
}
/**
* A {@code Consumer} of the configuration settings {@code Map} allowing the
* ability to add, replace,... | }
public abstract T build();
protected final Map<String, Object> getSettings() {
return this.settings;
}
@SuppressWarnings("unchecked")
protected final B getThis() {
return (B) this;
}
}
} | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\settings\AbstractSettings.java | 1 |
请完成以下Java代码 | public static <TT> JAXBElement<TT> createJAXBElement(final Object objectFactory, final TT obj) throws JAXBException
{
if (obj == null)
{
return null;
}
final Class<?> objClass = obj.getClass();
for (final Method method : objectFactory.getClass().getDeclaredMethods())
{
if (!method.getName().startsWi... | try
{
@SuppressWarnings("unchecked")
JAXBElement<TT> jaxbElement = (JAXBElement<TT>)method.invoke(objectFactory, obj);
return jaxbElement;
}
catch (Exception e)
{
throw new JAXBException("Cannot convert object " + obj + " to JAXBElement by using method " + method, e);
}
}
throw new J... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.esb.base\src\main\java\de\metas\printing\esb\base\jaxb\ObjectFactoryHelper.java | 1 |
请完成以下Java代码 | public static class Pairing {
private final AtomicBoolean signedScorecard = new AtomicBoolean(false);
@NonNull
private final Golfer playerOne;
@NonNull
private final Golfer playerTwo;
public synchronized void setHole(int hole) {
this.playerOne.setHole(hole);
this.playerTwo.setHole(hole);
}
pu... | }
public boolean in(@NonNull Golfer golfer) {
return this.playerOne.equals(golfer) || this.playerTwo.equals(golfer);
}
public synchronized int nextHole() {
return getHole() + 1;
}
public synchronized boolean signScorecard() {
return getHole() >= 18
&& this.signedScorecard.compareAndSet(false,... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\model\GolfTournament.java | 1 |
请完成以下Java代码 | public void loadComplete()
{
} // loadComplete
/**
* Set lookup model as mandatory, use in loading data
* @param flag
*/
public void setMandatory(boolean flag)
{
m_mandatory = flag;
}
/**
* Is lookup model mandatory
* @return boolean
*/
public boolean isMandatory()
{
return m_mandatory;
}... | /**
* Suggests a valid value for given value
*
* @param value
* @return equivalent valid value or same this value is valid; if there are no suggestions, null will be returned
*/
public NamePair suggestValidValue(final NamePair value)
{
return null;
}
/**
* Returns true if given <code>display</code> v... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\Lookup.java | 1 |
请完成以下Java代码 | public static OneTimeTokenAuthenticationToken unauthenticated(@Nullable String tokenValue) {
return new OneTimeTokenAuthenticationToken(null, (tokenValue != null) ? tokenValue : "");
}
/**
* Creates an unauthenticated token
* @param principal the principal
* @param tokenValue the one-time token value
* @re... | public @Nullable String getTokenValue() {
return this.tokenValue;
}
@Override
public @Nullable Object getCredentials() {
return this.tokenValue;
}
@Override
public @Nullable Object getPrincipal() {
return this.principal;
}
} | repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\ott\OneTimeTokenAuthenticationToken.java | 1 |
请完成以下Java代码 | public static String generateBase64EncodedSecretKey() {
SecretKey key = generateSecretKey();
byte[] secretKeyBytes = key.getEncoded();
return Base64.getEncoder().encodeToString(secretKeyBytes);
}
/**
* <p>getAESKeyFromPassword.</p>
*
* @param password an array of {@link c... | SecretKeyFactory factory = SecretKeyFactory.getInstance(algorithm);
KeySpec spec = new PBEKeySpec(password, saltGenerator.generateSalt(AES_KEY_PASSWORD_SALT_LENGTH), iterations, AES_KEY_SIZE);
return new SecretKeySpec(factory.generateSecret(spec).getEncoded(), "AES");
}
/**
* <p>Constructo... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\encryptor\SimpleGCMByteEncryptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MainApplication {
private final BookstoreService bookstoreService;
public MainApplication(BookstoreService bookstoreService) {
this.bookstoreService = bookstoreService;
}
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
... | List<AuthorDto> authorsDto = bookstoreService.fetchNicknameAndAgeByGenre();
System.out.println(authorsDto);
System.out.println("\n--------------------------");
bookstoreService.fetchNicknameGenreAndAgeByGenre();
System.out.println("\n-----------... | repos\Hibernate-SpringBoot-master\HibernateSpringBootCallStoredProcedureJdbcTemplateBeanPropertyRowMapper\src\main\java\com\bookstore\MainApplication.java | 2 |
请完成以下Java代码 | public int getAD_Val_Rule_Included_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Val_Rule_Included_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** EntityType AD_Reference_ID=389 */
public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entitäts-Art.
@param EntityType
Di... | @return Validation rule to be included.
*/
public int getIncluded_Val_Rule_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Included_Val_Rule_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Val_Rule_Included.java | 1 |
请完成以下Java代码 | public void setAD_Color_ID (int AD_Color_ID)
{
if (AD_Color_ID < 1)
set_Value (COLUMNNAME_AD_Color_ID, null);
else
set_Value (COLUMNNAME_AD_Color_ID, Integer.valueOf(AD_Color_ID));
}
/** Get System Color.
@return Color for backgrounds or indicators
*/
public int getAD_Color_ID ()
{
Integer ii ... | }
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Comment/Help.
@param Help
Comment or Hint
*/
public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/**... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Desktop.java | 1 |
请完成以下Java代码 | public boolean isDmnFeelEnableLegacyBehavior() {
return dmnFeelEnableLegacyBehavior;
}
public ProcessEngineConfigurationImpl setDmnFeelEnableLegacyBehavior(boolean dmnFeelEnableLegacyBehavior) {
this.dmnFeelEnableLegacyBehavior = dmnFeelEnableLegacyBehavior;
return this;
}
public boolean isDmnRetu... | public ProcessEngineConfigurationImpl setRemovalTimeUpdateChunkSize(int removalTimeUpdateChunkSize) {
this.removalTimeUpdateChunkSize = removalTimeUpdateChunkSize;
return this;
}
/**
* @return a exception code interceptor. The interceptor is not registered in case
* {@code disableExceptionCode} is co... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\ProcessEngineConfigurationImpl.java | 1 |
请完成以下Java代码 | public String getValue() {
return this.value;
}
}
/**
* Locate the queue leader.
*
* @since 2.3.7
*
*/
public enum LeaderLocator {
/**
* Deploy on the node with the fewest queue leaders.
*/
minLeaders("min-masters"),
/**
* Deploy on the node we are connected to.
*/
clientLocal(... | private final String value;
LeaderLocator(String value) {
this.value = value;
}
/**
* Return the value.
* @return the value.
*/
public String getValue() {
return this.value;
}
}
} | repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\QueueBuilder.java | 1 |
请完成以下Java代码 | public void onBeforeComplete(final I_C_RfQResponse rfqResponse)
{
// nothing
}
@Override
public void onAfterComplete(final I_C_RfQResponse rfqResponse)
{
// nothing
}
@Override
public void onBeforeClose(final I_C_RfQResponse rfqResponse)
{
// nothing
}
@Override
public void onAfterClose(final I_C_R... | public void onAfterUnClose(final I_C_RfQ rfq)
{
// nothing
}
@Override
public void onBeforeUnClose(final I_C_RfQResponse rfqResponse)
{
// nothing
}
@Override
public void onAfterUnClose(final I_C_RfQResponse rfqResponse)
{
// nothing
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\event\RfQEventListenerAdapter.java | 1 |
请完成以下Java代码 | public void detachState() {
variable.getExecution().removeVariableInternal(variable);
}
@Override
public void attachState(MigratingScopeInstance owningActivityInstance) {
ExecutionEntity representativeExecution = owningActivityInstance.resolveRepresentativeExecution();
ScopeImpl currentScope = owning... | protected void migrateHistory() {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
if (historyLevel.isHistoryEventProduced(HistoryEventTypes.VARIABLE_INSTANCE_MIGRATE, this)) {
HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.HistoryEventCreator()... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingVariableInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private PropertySource<?> newPropertySource(String name, Properties properties) {
return new SpringDataGemFirePropertiesPropertySource(name, properties);
}
private VcapPropertySource toVcapPropertySource(Environment environment) {
return VcapPropertySource.from(environment);
}
}
static class EnableSecur... | // (spring-cloud-services-starter-service-registry) from losing the Apache Geode or Cloud Cache Security Context
// credentials stored in the Environment.
static class SpringDataGemFirePropertiesPropertySource extends PropertySource<Properties> {
private static final String SPRING_DATA_GEMFIRE_PROPERTIES_PROPERTY_... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\ClientSecurityAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setProtocolHeaderHttpsValue(String protocolHeaderHttpsValue) {
this.protocolHeaderHttpsValue = protocolHeaderHttpsValue;
}
public String getPortHeader() {
return this.portHeader;
}
public void setPortHeader(String portHeader) {
this.portHeader = portHeader;
}
public @Nullable String ... | */
public enum UseApr {
/**
* Always use APR and fail if it's not available.
*/
ALWAYS,
/**
* Use APR if it is available.
*/
WHEN_AVAILABLE,
/**
* Never use APR.
*/
NEVER
}
} | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\autoconfigure\TomcatServerProperties.java | 2 |
请完成以下Java代码 | public boolean isApplyToTopLevelHUsOnly()
{
return get_ValueAsBoolean(COLUMNNAME_IsApplyToTopLevelHUsOnly);
}
@Override
public void setIsApplyToTUs (final boolean IsApplyToTUs)
{
set_Value (COLUMNNAME_IsApplyToTUs, IsApplyToTUs);
}
@Override
public boolean isApplyToTUs()
{
return get_ValueAsBoolean(C... | }
@Override
public int getM_HU_PI_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_PI_ID);
}
@Override
public void setM_HU_Process_ID (final int M_HU_Process_ID)
{
if (M_HU_Process_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_HU_Process_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_HU_Process_ID, M_HU_Pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Process.java | 1 |
请完成以下Spring Boot application配置 | server.servlet.context-path=/spring-mvc-java
spring.servlet.multipart.max-file-size=1MB
spring.servlet.multipart.max-request-size=1MB
spring.servlet.multipa | rt.enabled=true
spring.servlet.multipart.location=${java.io.tmpdir} | repos\tutorials-master\spring-web-modules\spring-mvc-java\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public void setCmmnManagementService(CmmnManagementService cmmnManagementService) {
this.cmmnManagementService = cmmnManagementService;
}
@Override
public CmmnRepositoryService getCmmnRepositoryService() {
return cmmnRepositoryService;
}
public void setCmmnRepositoryService(Cmm... | return cmmnHistoryService;
}
public void setCmmnHistoryService(CmmnHistoryService cmmnHistoryService) {
this.cmmnHistoryService = cmmnHistoryService;
}
@Override
public CmmnMigrationService getCmmnMigrationService() {
return cmmnMigrationService;
}
public void setCmmnMigra... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\CmmnEngineImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Map<String, String> loginType() {
List<String> oauthList = factory.oauthList();
return oauthList.stream().collect(Collectors.toMap(oauth -> oauth.toLowerCase() + "登录", oauth -> "http://oauth.xkcoding.com/demo/oauth/login/" + oauth.toLowerCase()));
}
/**
* 登录
*
* @param oau... | * @param callback 携带返回的信息
* @return 登录成功后的信息
*/
@RequestMapping("/{oauthType}/callback")
public AuthResponse login(@PathVariable String oauthType, AuthCallback callback) {
AuthRequest authRequest = factory.get(getAuthSource(oauthType));
AuthResponse response = authRequest.login(callba... | repos\spring-boot-demo-master3\demo-social\src\main\java\com\xkcoding\social\controller\OauthController.java | 2 |
请完成以下Java代码 | public class PrinterActor extends AbstractActor {
private final LoggingAdapter log = Logging.getLogger(getContext().getSystem(), this);
public static Props props(String text) {
return Props.create(PrinterActor.class, text);
}
public static final class PrintFinalResult {
Integer totalN... | @Override
public void postStop() {
log.info("Stopping PrinterActor {}", this);
}
@Override
public Receive createReceive() {
return receiveBuilder()
.match(PrinterActor.PrintFinalResult.class,
r -> {
log.info("Received ... | repos\tutorials-master\akka-modules\akka-actors\src\main\java\com\baeldung\akkaactors\PrinterActor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CredentialsMatcher credentialsMatcher() {
//明文密码
//CustomCredentialsMatcher matcher = new CustomCredentialsMatcher();
//HashedCredentialsMatcher matcher = new HashedCredentialsMatcher();
RetryLimitHashedCredentialsMatcher matcher = new RetryLimitHashedCredentialsMatcher(shiroRedis... | @Bean
@DependsOn({"lifecycleBeanPostProcessor"})
public DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
advisorAutoProxyCreator.setProxyTargetClass(true);
return advisorAutoProxyCrea... | repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\ShiroConfig.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.