instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void setM_Product_Category_ID (final int M_Product_Category_ID)
{
if (M_Product_Category_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_Category_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Product_Category_ID, M_Product_Category_ID);
}
@Override
public int getM_Product_Category_ID()
{
ret... | @Override
public BigDecimal getPlannedQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PlannedQty);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setProductValue (final @Nullable java.lang.String ProductValue)
{
set_ValueNoCheck (COLUMNNAME_ProductValue, ProductValue);
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_Details_v.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setObservationRegistry(ObservationRegistry observationRegistry) {
this.observationRegistry = observationRegistry;
}
}
static class ObservationRegistryFactory implements FactoryBean<ObservationRegistry> {
@Override
public ObservationRegistry getObject() throws Exception {
return ObservationR... | private ObservationRegistry observationRegistry = ObservationRegistry.NOOP;
@Override
public FilterChainProxy.FilterChainDecorator getObject() throws Exception {
if (this.observationRegistry.isNoop()) {
return new FilterChainProxy.VirtualFilterChainDecorator();
}
return new ObservationFilterChainDecor... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\HttpSecurityBeanDefinitionParser.java | 2 |
请完成以下Java代码 | public class DefaultJaxBContextProvider implements JaxBContextProvider {
private static final DomXmlLogger LOG = DomXmlLogger.XML_DOM_LOGGER;
public JAXBContext getContext(Class<?>... types) {
try {
return JAXBContext.newInstance(types);
}
catch (JAXBException e) {
throw LOG.unableToCreate... | } catch (JAXBException e) {
throw LOG.unableToCreateMarshaller(e);
}
}
@Override
public Unmarshaller createUnmarshaller(Class<?>... types) {
try {
return getContext(types).createUnmarshaller();
} catch (JAXBException e) {
throw LOG.unableToCreateUnmarshaller(e);
}
}
} | repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\format\spi\DefaultJaxBContextProvider.java | 1 |
请完成以下Java代码 | public class MonthInterval {
public int monthsBetween(Date startDate, Date endDate) {
if (startDate == null || endDate == null) {
throw new IllegalArgumentException("Both startDate and endDate must be provided");
}
Calendar startCalendar = Calendar.getInstance();
... | startCalendar.setTime(startDate);
int startDateDayOfMonth = startCalendar.get(Calendar.DAY_OF_MONTH);
int startDateTotalMonths = 12 * startCalendar.get(Calendar.YEAR) + startCalendar.get(Calendar.MONTH);
Calendar endCalendar = Calendar.getInstance();
endCalendar.setTime... | repos\tutorials-master\core-java-modules\core-java-8-datetime-3\src\main\java\com\baeldung\monthintervalbetweentwodates\MonthInterval.java | 1 |
请完成以下Java代码 | final class OAuth2EndpointUtils {
private OAuth2EndpointUtils() {
}
static MultiValueMap<String, String> getFormParameters(HttpServletRequest request) {
Map<String, String[]> parameterMap = request.getParameterMap();
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
parameterMap.forEach... | return parameters;
}
static MultiValueMap<String, String> getQueryParameters(HttpServletRequest request) {
Map<String, String[]> parameterMap = request.getParameterMap();
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>();
parameterMap.forEach((key, values) -> {
String queryString = Stri... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\web\authentication\OAuth2EndpointUtils.java | 1 |
请完成以下Java代码 | public String getParentProcessDefinitionId() {
return parentProcessDefinitionId;
}
@CamundaQueryParam(value="parentProcessDefinitionId")
public void setParentProcessDefinitionId(String parentProcessDefinitionId) {
this.parentProcessDefinitionId = parentProcessDefinitionId;
}
public String getSuperPr... | queryVariableValues = createQueryVariableValues(variableTypes, variables, dbType);
}
@Override
protected String getOrderByValue(String sortBy) {
return super.getOrderBy();
}
@Override
protected boolean isValidSortByValue(String value) {
return false;
}
private List<QueryVariableValue> createQ... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\plugin\base\dto\query\ProcessDefinitionQueryDto.java | 1 |
请完成以下Java代码 | public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public String getProcessInstanceId() {
return this.processInstanceId;
}
public void setProcessI... | public static CommentDto fromComment(Comment comment) {
CommentDto dto = new CommentDto();
dto.id = comment.getId();
dto.userId = comment.getUserId();
dto.time = comment.getTime();
dto.taskId = comment.getTaskId();
dto.message = comment.getFullMessage();
dto.removalTime = comment.getRemovalT... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\task\CommentDto.java | 1 |
请完成以下Java代码 | private void updateUI()
{
assertEventDispatchThread();
final boolean visibleNew = !notification2panel.isEmpty();
if (visibleNew)
{
revalidate();
pack();
final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();// size of the screen
final Insets screenInsets = Toolkit.getDefaultTo... | private NotificationItem toNotificationItem(final Event event)
{
//
// Build summary text
final String summaryTrl = msgBL.getMsg(getCtx(), MSG_Notification_Summary_Default, new Object[] { Adempiere.getName() });
final UserNotification notification = UserNotificationUtils.toUserNotification(event);
//
// B... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\notifications\SwingEventNotifierFrame.java | 1 |
请完成以下Java代码 | public void putContextInfos(final Map<StockAvailabilityQueryItem, MSV3ArtikelContextInfo> contextInfos)
{
contextInfosByQueryItem.putAll(contextInfos);
}
public void putContextInfo(
@NonNull final StockAvailabilityQueryItem queryItem,
@NonNull final MSV3ArtikelContextInfo contextInfo)
{
contextInfosByQue... | if (otherException != null)
{
final AdIssueId issueId = Services.get(IErrorManager.class).createIssue(otherException);
transactionRecord.setAD_Issue_ID(issueId.getRepoId());
}
save(transactionRecord);
return transactionRecord;
}
public RuntimeException getExceptionOrNull()
{
if (faultInfo == null &... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\availability\MSV3AvailabilityTransaction.java | 1 |
请完成以下Java代码 | public <T> T call(final Callable<T> callable) {
return call(null, callable);
}
/**
* Execute a {@link Callable} binding the given {@link ConnectionFactory} and finally unbinding it.
* @param contextName the name of the context. In null, empty or blank, default context is bound.
* @param callable the {@lin... | }
finally {
unbind(contextName);
}
}
/**
* Bind the context.
* @param contextName the name of the context for the connection factory.
*/
private void bind(@Nullable String contextName) {
if (StringUtils.hasText(contextName)) {
SimpleResourceHolder.bind(this.connectionFactory, contextName);
}
}
... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\ConnectionFactoryContextWrapper.java | 1 |
请完成以下Java代码 | public class AddProductCommand {
@TargetAggregateIdentifier
private final String orderId;
private final String productId;
public AddProductCommand(String orderId, String productId) {
this.orderId = orderId;
this.productId = productId;
}
public String getOrderId() {
ret... | }
AddProductCommand that = (AddProductCommand) o;
return Objects.equals(orderId, that.orderId) && Objects.equals(productId, that.productId);
}
@Override
public int hashCode() {
return Objects.hash(orderId, productId);
}
@Override
public String toString() {
retur... | repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\coreapi\commands\AddProductCommand.java | 1 |
请完成以下Java代码 | public class AtomNode
{
public String sWord;
public int nPOS;
public AtomNode(String sWord, int nPOS)
{
this.sWord = sWord;
this.nPOS = nPOS;
}
public AtomNode(char c, int nPOS)
{
this.sWord = String.valueOf(c);
this.nPOS = nPOS;
}
/**
* 原子的词性
... | "word='" + sWord + '\'' +
", nature=" + nPOS +
'}';
}
public static Vertex convert(String word, int type)
{
String name = word;
Nature nature = Nature.n;
int dValue = 1;
switch (type)
{
case CharType.CT_CHINESE:
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\NShort\Path\AtomNode.java | 1 |
请完成以下Java代码 | public long executeCount(CommandContext commandContext) {
checkQueryOk();
return commandContext
.getOperationLogManager()
.findOperationLogEntryCountByQueryCriteria(this);
}
public List<UserOperationLogEntry> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return... | this.isTenantIdSet = true;
return this;
}
public UserOperationLogQuery withoutTenantId() {
this.tenantIds = null;
this.isTenantIdSet = true;
return this;
}
@Override
protected boolean hasExcludingConditions() {
return super.hasExcludingConditions() || CompareUtil.areNotInAscendingOrder(t... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\UserOperationLogQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ODataServiceFactory getServiceFactory() {
return this.serviceFactory;
}
}
@Provider
public static class EntityManagerFilter implements ContainerRequestFilter,
ContainerResponseFilter {
public static final String EM_REQUEST_ATTRIBUTE =
EntityMan... | if (!"GET".equalsIgnoreCase(containerRequestContext.getMethod())) {
entityManager.getTransaction().begin();
}
}
@Override
public void filter(ContainerRequestContext requestContext,
ContainerResponseContext responseContext) throws IOException... | repos\springboot-demo-master\olingo\src\main\java\com\et\olingo\config\JerseyConfig.java | 2 |
请完成以下Java代码 | public String toString()
{
return "basic public fields";
}
@Override
public boolean test(final IDocumentFieldView field)
{
return field.isPublicField() && !field.isAdvancedField();
}
};
private static final Predicate<DocumentFieldChange> FILTER_DocumentFieldChange_BASIC_PUBLIC_FIELDS = new Predica... | {
super();
this.fieldNamesSet = fieldNamesSet;
this.parentFilter = parentFilter;
}
@Override
public String toString()
{
return "field name in " + fieldNamesSet + " and " + parentFilter;
}
@Override
public boolean test(final IDocumentFieldView field)
{
if (!fieldNamesSet.contains(field.g... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentOptions.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getAttachmentPrefix(final String defaultValue)
{
if (attachmentPrefix == null)
{
return defaultValue;
}
return attachmentPrefix;
}
@Override
public I_AD_User getFrom()
{
return from;
}
@Override
public String getMessage()
{
return "";
}
@Override
public String getSubject()
{... | }
@Override
public String getTo()
{
return to;
}
@Override
public String getExportFilePrefix()
{
return EXPORT_FILE_PREFIX;
}
@Override
public MADBoilerPlate getDefaultTextPreset()
{
if (defaultBoilerPlateId != null && defaultBoilerPlateId > 0)
{
return new MADBoilerPlate(Env.getCtx(), defaultB... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\compiere\report\email\service\impl\DocumentEmailParams.java | 2 |
请完成以下Java代码 | public ICompositeQueryUpdater<T> addQueryUpdater(@NonNull final IQueryUpdater<T> updater)
{
queryUpdaters.add(updater);
sqlBuilt = false;
return this;
}
@Override
public ICompositeQueryUpdater<T> addSetColumnValue(final String columnName, @Nullable final Object value)
{
final IQueryUpdater<T> updater = ... | }
if (queryUpdaters.isEmpty())
{
throw new AdempiereException("Cannot build sql update query for an empty " + CompositeQueryUpdater.class);
}
final StringBuilder sql = new StringBuilder();
final List<Object> params = new ArrayList<>();
for (final IQueryUpdater<T> updater : queryUpdaters)
{
final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\CompositeQueryUpdater.java | 1 |
请完成以下Java代码 | public Map<String, Object> getProcessVariables() {
Map<String, Object> variables = new HashMap<String, Object>();
if (queryVariables != null) {
for (VariableInstanceEntity variableInstance : queryVariables) {
if (variableInstance.getId() != null && variableInstance.getTaskId(... | public void setClaimTime(Date claimTime) {
this.claimTime = claimTime;
}
public Integer getAppVersion() {
return this.appVersion;
}
public void setAppVersion(Integer appVersion) {
this.appVersion = appVersion;
}
public String toString() {
return "Task[id=" + id... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TaskEntityImpl.java | 1 |
请完成以下Java代码 | public Money convertToRelativeValue(@NonNull final Money realValue)
{
final int toRelativeValueMultiplier = getToRelativeValueMultiplier();
return toRelativeValueMultiplier > 0 ? realValue : realValue.negate();
}
public Amount convertToRelativeValue(@NonNull final Amount realValue)
{
final int toRelativeValu... | // Do we have to SO adjust?
if (isAPAdjusted)
{
final int multiplierAP = soTrx.isPurchase() ? -1 : +1;
multiplier *= multiplierAP;
}
// Do we have to adjust by Credit Memo?
if (isCreditMemoAdjusted)
{
final int multiplierCM = isCreditMemo ? -1 : +1;
multiplier *= multiplierCM;
}
return mult... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\InvoiceAmtMultiplier.java | 1 |
请完成以下Java代码 | protected void addError(
List<ValidationError> validationErrors,
String problem,
Process process,
BaseElement baseElement,
boolean isWarning,
Map<String, String> params
) {
ValidationError error = new ValidationError();
error.setWarning(isWarning);
... | error.setActivityId(flowElement.getId());
error.setActivityName(flowElement.getName());
}
addError(validationErrors, error);
}
protected void addError(List<ValidationError> validationErrors, String problem, Process process, String id) {
ValidationError error = new Validatio... | repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\validator\ValidatorImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isCachable() {
return true;
}
@Override
public boolean isAbleToStore(Object value) {
if (value instanceof Collection) {
return EMPTY_LIST_CLASS.isInstance(value) || EMPTY_SET_CLASS.isInstance(value);
}
return false;
}
@Override
public... | }
}
@Override
public Object getValue(ValueFields valueFields) {
String value = valueFields.getTextValue();
if (LIST.equals(value)) {
return Collections.emptyList();
} else if (SET.equals(value)) {
return Collections.emptySet();
}
return null;... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\EmptyCollectionType.java | 2 |
请完成以下Java代码 | public class HUTrxAttributeProcessor_HU implements IHUTrxAttributeProcessor
{
@Override
public void processSave(final IHUContext huContext, final I_M_HU_Trx_Attribute trxAttribute, final Object referencedModel)
{
if (!HUConstants.DEBUG_07277_processHUTrxAttribute)
{
return; // FIXME debuging
}
final I_M_... | final IHUAttributesDAO huAttributesDAO = huContext.getHUAttributeStorageFactory().getHUAttributesDAO();
final I_M_HU_Attribute huAttributeExisting = retrieveHUAttribute(huAttributesDAO, huTrxAttribute);
if (huAttributeExisting == null)
{
throw new InvalidAttributeValueException("Retrieved HUAttribute cannot be... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\spi\impl\HUTrxAttributeProcessor_HU.java | 1 |
请完成以下Java代码 | private List<RuleChain> findEdgeRuleChains(TenantId tenantId, EdgeId edgeId) {
List<RuleChain> result = new ArrayList<>();
PageDataIterable<RuleChain> ruleChains = new PageDataIterable<>(
link -> ruleChainService.findRuleChainsByTenantIdAndEdgeId(tenantId, edgeId, link), 1024);
f... | public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findEdgeById(tenantId, new EdgeId(entityId.getId())));
}
@Override
public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) {
return FluentFuture.from... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\edge\EdgeServiceImpl.java | 1 |
请完成以下Java代码 | public int hashCode() {
// name's hashCode is multiplied by an arbitrary prime number (13)
// in order to make sure there is a difference in the hashCode between
// these two parameters:
// name: a value: aa
// name: aa value: a
return key.hashCode() * 13 + (value == n... | *
* @param o the <code>Object</code> to test for
* equality with this <code>Pair</code>
* @return <code>true</code> if the given <code>Object</code> is
* equal to this <code>Pair</code> else <code>false</code>
*/
@Override
public boolean equals(Object o) {
if (this == o) return ... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\Pair.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setTopCategoryId(String topCategoryId) {
this.topCategoryId = topCategoryId;
}
public String getSubCategoryId() {
return subCategoryId;
}
public void setSubCategoryId(String subCategoryId) {
this.subCategoryId = subCategoryId;
}
public String getBrandId() {... | return orderByPrice;
}
public void setOrderByPrice(Integer orderByPrice) {
this.orderByPrice = orderByPrice;
}
public Integer getOrderBySales() {
return orderBySales;
}
public void setOrderBySales(Integer orderBySales) {
this.orderBySales = orderBySales;
}
@Ov... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\product\ProdQueryReq.java | 2 |
请完成以下Java代码 | public Optional<byte[]> getInvoicePDF(@NonNull final InvoiceId invoiceId)
{
return getLastArchive(invoiceId).map(archiveBL::getBinaryData);
}
public boolean hasArchive(@NonNull final InvoiceId invoiceId)
{
return getLastArchive(invoiceId).isPresent();
}
private Optional<I_AD_Archive> getLastArchive(@NonNull... | .currency(currency)
.build());
}
return result.build();
}
@NonNull
public Optional<JsonReverseInvoiceResponse> reverseInvoice(@NonNull final InvoiceId invoiceId)
{
final I_C_Invoice documentRecord = invoiceDAO.getByIdInTrx(invoiceId);
if (documentRecord == null)
{
return Optional.empty();
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\invoice\impl\InvoiceService.java | 1 |
请完成以下Java代码 | public boolean invalidateIt()
{
log.info(toString());
setDocAction(DOCACTION_Prepare);
return true;
} // invalidateIt
/**
* Prepare Document
*
* @return new status (In Progress or Invalid)
*/
@Override
public String prepareIt()
{
log.info(toString());
m_processMsg = ModelValidationEngine.get().... | @Override
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngi... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\model\MCFlatrateConditions.java | 1 |
请完成以下Java代码 | public int getC_BPartner_ID()
{
return delegate.getC_BPartner_ID();
}
@Override
public void setC_BPartner_ID(final int C_BPartner_ID)
{
delegate.setC_BPartner_ID(C_BPartner_ID);
}
@Override
public int getC_BPartner_Location_ID()
{
return delegate.getC_BPartner_Location_ID();
}
@Override
public void... | IDocumentLocationAdapter.super.setRenderedAddress(from);
}
public void setFrom(@NonNull final I_M_InOut from)
{
setFrom(new DocumentLocationAdapter(from).toDocumentLocation());
}
public void setFrom(@NonNull final I_C_Order from)
{
setFrom(OrderDocumentLocationAdapterFactory.locationAdapter(from).toDocumen... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\location\adapter\DocumentLocationAdapter.java | 1 |
请完成以下Java代码 | public void setGO_RequestUsername (java.lang.String GO_RequestUsername)
{
set_Value (COLUMNNAME_GO_RequestUsername, GO_RequestUsername);
}
/** Get Request Username.
@return Request Username */
@Override
public java.lang.String getGO_RequestUsername ()
{
return (java.lang.String)get_Value(COLUMNNAME_GO_R... | }
@Override
public void setM_Shipper(org.compiere.model.I_M_Shipper M_Shipper)
{
set_ValueFromPO(COLUMNNAME_M_Shipper_ID, org.compiere.model.I_M_Shipper.class, M_Shipper);
}
/** Set Lieferweg.
@param M_Shipper_ID
Methode oder Art der Warenlieferung
*/
@Override
public void setM_Shipper_ID (int M_Ship... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-gen\de\metas\shipper\gateway\go\model\X_GO_Shipper_Config.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ClientDetails loadClientByClientId(String id) throws ClientRegistrationException {
return sysClientDetailsRepository.findFirstByClientId(id).orElseThrow(() -> new ClientRegistrationException("Loading client exception."));
}
@Override
public SysClientDetails findByClientId(String clientId) {
... | clientDetails.setClientSecret(exist.getClientSecret());
sysClientDetailsRepository.save(clientDetails);
}
@Override
public void updateClientSecret(String clientId, String clientSecret) throws NoSuchClientException {
SysClientDetails exist = sysClientDetailsRepository.findFirstByClientId(cli... | repos\spring-boot-demo-master\demo-oauth\oauth-authorization-server\src\main\java\com\xkcoding\oauth\service\impl\SysClientDetailsServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected void validateCreate(TenantId tenantId, Device device) {
validateNumberOfEntitiesPerTenant(tenantId, EntityType.DEVICE);
}
@Override
protected Device validateUpdate(TenantId tenantId, Device device) {
Device old = deviceDao.findById(device.getTenantId(), device.getId().getId());
... | } else if (!device.getCustomerId().getId().equals(NULL_UUID)) {
Customer customer = customerDao.findById(device.getTenantId(), device.getCustomerId().getId());
if (customer == null) {
throw new DataValidationException("Can't assign device to non-existent customer!");
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\DeviceDataValidator.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
@ApiModelProperty(example = "dmn-DecisionTableOne.dmn")
public String getResourceName() {
return resourceName;
}
public void setResourceName(String resourceN... | @ApiModelProperty(example = "null")
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@ApiModelProperty(example = "decision_table")
public String getDecisionType() {
return decisionType;
}
pub... | repos\flowable-engine-main\modules\flowable-dmn-rest\src\main\java\org\flowable\dmn\rest\service\api\repository\DecisionResponse.java | 2 |
请完成以下Java代码 | public void setDocumentNo (String DocumentNo)
{
set_ValueNoCheck (COLUMNNAME_DocumentNo, DocumentNo);
}
/** Get Document No.
@return Document sequence number of the document
*/
public String getDocumentNo ()
{
return (String)get_Value(COLUMNNAME_DocumentNo);
}
/** Set Record ID.
@param Record_ID
... | if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
/** Get Record ID.
@return Direct internal record ID
*/
public int getRecord_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID);
if (ii == nul... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Sequence_Audit.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ColorId implements RepoIdAware
{
int repoId;
@JsonCreator
public static ColorId ofRepoId(final int repoId)
{
return new ColorId(repoId);
}
public static ColorId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new ColorId(repoId) : null;
}
public static int toRepoId(final ColorId id) | {
return id != null ? id.getRepoId() : -1;
}
private ColorId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "AD_Color_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\util\ColorId.java | 2 |
请完成以下Spring Boot application配置 | spring.datasource.initialization-mode=always
spring.datasource.platform=mysql
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
logging.level.com.zaxxer.hikari.HikariConfig=DEBUG
logging.leve | l.com.zaxxer.hikari=TRACE
spring.jpa.open-in-view=false
spring.jpa.hibernate.ddl-auto=create | repos\Hibernate-SpringBoot-master\HibernateSpringBootDataSourceBuilderProgHikariCPKickoff\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public Builder<?> toBuilder() {
return new Builder<>(this);
}
/**
* A builder of {@link CasServiceTicketAuthenticationToken} instances
*
* @since 7.0
*/
public static class Builder<B extends Builder<B>> extends AbstractAuthenticationBuilder<B> {
private String principal;
private @Nullable Object cre... | return (B) this;
}
@Override
public B credentials(@Nullable Object credentials) {
Assert.notNull(credentials, "credentials cannot be null");
this.credentials = credentials;
return (B) this;
}
@Override
public CasServiceTicketAuthenticationToken build() {
return new CasServiceTicketAuthenticati... | repos\spring-security-main\cas\src\main\java\org\springframework\security\cas\authentication\CasServiceTicketAuthenticationToken.java | 1 |
请完成以下Java代码 | public String getBatchType() {
return batchType;
}
public void setBatchType(String batchType) {
this.batchType = batchType;
}
public Integer getHistoryTimeToLive() {
return historyTimeToLive;
}
public void setHistoryTimeToLive(Integer historyTimeToLive) {
this.historyTimeToLive = historyT... | protected CleanableHistoricBatchReport createNewReportQuery(ProcessEngine engine) {
return engine.getHistoryService().createCleanableHistoricBatchReport();
}
public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
List<CleanableHistoricBatch... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\batch\CleanableHistoricBatchReportResultDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class LoggingAspect {
private final Logger logger = LoggerFactory.getLogger(getClass());
//Pointcut - When?
// execution(* PACKAGE.*.*(..))
@Before("com.in28minutes.learnspringaop.aopexample.aspects.CommonPointcutConfig.allPackageConfigUsingBean()")//WHEN
public void logMethodCallBeforeExecution(JoinPoi... | )
public void logMethodCallAfterException(JoinPoint joinPoint, Exception exception) {
logger.info("AfterThrowing Aspect - {} has thrown an exception {}"
, joinPoint, exception);
}
@AfterReturning(
pointcut = "com.in28minutes.learnspringaop.aopexample.aspects.CommonPointcutConfig.dataPackageConfig()",
retur... | repos\master-spring-and-spring-boot-main\73-spring-aop\src\main\java\com\in28minutes\learnspringaop\aopexample\aspects\LoggingAspect.java | 2 |
请完成以下Java代码 | public void setIsShipmentsNotSent (final boolean IsShipmentsNotSent)
{
throw new IllegalArgumentException ("IsShipmentsNotSent is virtual column"); }
@Override
public boolean isShipmentsNotSent()
{
return get_ValueAsBoolean(COLUMNNAME_IsShipmentsNotSent);
}
@Override
public void setMovementDate (final @Nu... | public boolean isProcessing()
{
return get_ValueAsBoolean(COLUMNNAME_Processing);
}
@Override
public void setShipment_DocumentNo (final @Nullable java.lang.String Shipment_DocumentNo)
{
throw new IllegalArgumentException ("Shipment_DocumentNo is virtual column"); }
@Override
public java.lang.String getShi... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_Desadv.java | 1 |
请完成以下Java代码 | public void exitMulDiv(LabeledExprParser.MulDivContext ctx) {
int left = values.get(ctx.expr(0));
int right = values.get(ctx.expr(1));
if (ctx.op.getType() == LabeledExprParser.MUL) {
values.put(ctx, left * right);
} else {
values.put(ctx, left / right);
}... | }
@Override
public void exitId(LabeledExprParser.IdContext ctx) {
String id = ctx.ID().getText();
if (memory.containsKey(id)) {
values.put(ctx, memory.get(id));
} else {
values.put(ctx, 0); // default value if the variable is not found
}
}
@Overr... | repos\springboot-demo-master\ANTLR\src\main\java\com\et\antlr\EvalListener.java | 1 |
请完成以下Java代码 | protected void copyPostDeployers(ProcessEngineConfigurationImpl flowable6Configuration, org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl flowable5Configuration) {
if (flowable6Configuration.getCustomPostDeployers() != null) {
List<org.activiti.engine.impl.persistence.deploy.Deployer> acti... | flowable5Configuration.setCustomDefaultBpmnParseHandlers(convert(flowable6Configuration.getFlowable5CustomDefaultBpmnParseHandlers()));
}
protected List<BpmnParseHandler> convert(List<Object> activiti5BpmnParseHandlers) {
if (activiti5BpmnParseHandlers == null) {
return null;
}
... | repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\DefaultProcessEngineFactory.java | 1 |
请完成以下Java代码 | private static SortedSet<LocalDateTime> newReverseSortedSet(final Collection<LocalDateTime> values)
{
final TreeSet<LocalDateTime> sortedSet = new TreeSet<>(Comparator.<LocalDateTime> naturalOrder().reversed());
if (values != null && !values.isEmpty())
{
sortedSet.addAll(values);
}
return sortedSet;
}
... | else
{
throw new IllegalArgumentException("Frequency type not supported for " + frequency);
}
}
private static IDateSequenceExploder createDateSequenceExploder(final Frequency frequency)
{
if (frequency.isWeekly())
{
if (frequency.isOnlySomeDaysOfTheWeek())
{
return DaysOfWeekExplode... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\generator\DateSequenceGenerator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getIdNo() {
return idNo;
}
public void setIdNo(String idNo) {
this.idNo = idNo;
}
public String getBankAccountNo() {
return bank... | public AuthStatusEnum getAuthStatusEnum() {
return authStatusEnum;
}
public void setAuthStatusEnum(AuthStatusEnum authStatusEnum) {
this.authStatusEnum = authStatusEnum;
}
public String getAuthMsg() {
return authMsg;
}
public void setAuthMsg(String authMsg) {
t... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\AuthResultVo.java | 2 |
请完成以下Java代码 | public void setQtyToProcess (final @Nullable BigDecimal QtyToProcess)
{
set_Value (COLUMNNAME_QtyToProcess, QtyToProcess);
}
@Override
public BigDecimal getQtyToProcess()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToProcess);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public... | }
@Override
public int getS_Resource_ID()
{
return get_ValueAsInt(COLUMNNAME_S_Resource_ID);
}
@Override
public org.compiere.model.I_S_Resource getWorkStation()
{
return get_ValueAsPO(COLUMNNAME_WorkStation_ID, org.compiere.model.I_S_Resource.class);
}
@Override
public void setWorkStation(final org.co... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_Candidate.java | 1 |
请完成以下Java代码 | private Authentication getAuthentication() {
Authentication authentication = this.securityContextHolderStrategy.getContext().getAuthentication();
if (authentication == null) {
throw new AuthenticationCredentialsNotFoundException(
"An Authentication object was not found in the SecurityContext");
}
return... | * @param observeOncePerRequest whether the filter should only be applied once per
* request
*/
public void setObserveOncePerRequest(boolean observeOncePerRequest) {
this.observeOncePerRequest = observeOncePerRequest;
}
/**
* If set to true, the filter will be applied to error dispatcher. Defaults to
* {@c... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\access\intercept\AuthorizationFilter.java | 1 |
请完成以下Java代码 | public void registerListener(@NonNull final IQueueProcessorListener listener, final int workpackageId)
{
Check.assume(workpackageId > 0, "workpackageId > 0");
// If it's null then don't register it
if (listener == NullQueueProcessorListener.instance)
{
return;
}
final ListenerEntry entry = new Listene... | {
// If it's null then don't unregister it because it was never registered
if (callback == NullQueueProcessorListener.instance)
{
return false;
}
return removeListenerEntry(workpackageId, callback);
}
@Override
public boolean unregisterListeners(final int workpackageId)
{
return removeListenerEntry... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\DefaultQueueProcessorEventDispatcher.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static class JasperEntry
{
@NonNull File jrxmlFile;
@NonNull File jasperFile;
@NonNull File hashFile;
public URL getJasperUrl()
{
try
{
return jasperFile.toURI().toURL();
}
catch (final MalformedURLException e)
{
throw new AdempiereException("Cannot convert " + jasperFile + " ... | }
private File getCompiledAssetFile(@NonNull final File jrxmlFile, @NonNull final String extension)
{
final Path jrxmlPath = jrxmlFile.toPath().toAbsolutePath();
// 1. Get the path *relative* to the drive/volume root.
// Example: For C:\workspaces\...\report.jrxml, this isolates:
// "workspaces\dt204\... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\class_loader\JasperCompileClassLoader.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private <T extends Collection<AnnotationAttributes>> T toAnnotationAttributesFromMultiValueMap(
MultiValueMap<String, Object> map) {
List<AnnotationAttributes> annotationAttributesList = new ArrayList<>();
map.forEach((key, value) -> {
for (int index = 0, size = value.size(); index < size; index++) {
A... | private String[] getNames(AnnotationAttributes annotationAttributes) {
String[] names = annotationAttributes.getStringArray("name");
String[] values = annotationAttributes.getStringArray("value");
Assert.isTrue(names.length > 0 || values.length > 0,
String.format("The name or value attribute of @%s is requir... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\condition\OnMissingPropertyCondition.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getPICaption(@NonNull final HuPackingInstructionsId piId)
{
return huService.getPI(piId).getName();
}
@Override
public String getLocatorName(@NonNull final LocatorId locatorId)
{
return locatorNamesCache.computeIfAbsent(locatorId, warehouseService::getLocatorNameById);
}
@Override
public HUQ... | @Override
public ScheduledPackageableLocks getLocks(final ShipmentScheduleAndJobScheduleIdSet scheduleIds)
{
return pickingJobLockService.getLocks(scheduleIds);
}
@Override
public int getSalesOrderLineSeqNo(@NonNull final OrderAndLineId orderAndLineId)
{
return orderService.getSalesOrderLineSeqNo(orderAndLin... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\repository\DefaultPickingJobLoaderSupportingServices.java | 2 |
请完成以下Java代码 | public VariableAggregationDefinitions getAggregations() {
return aggregations;
}
public void setAggregations(VariableAggregationDefinitions aggregations) {
this.aggregations = aggregations;
}
public void addAggregation(VariableAggregationDefinition aggregation) {
if (this.aggre... | public void setValues(MultiInstanceLoopCharacteristics otherLoopCharacteristics) {
super.setValues(otherLoopCharacteristics);
setInputDataItem(otherLoopCharacteristics.getInputDataItem());
setCollectionString(otherLoopCharacteristics.getCollectionString());
if (otherLoopCharacteristics.g... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\MultiInstanceLoopCharacteristics.java | 1 |
请完成以下Java代码 | public class User implements UserDetails {
private @MongoId ObjectId id;
private String username;
private String password;
private Set<UserRole> userRoles;
public ObjectId getId() {
return id;
}
@Override
public String getPassword() {
return password;
}
public ... | @Override
public boolean isAccountNonExpired() {
return false;
}
@Override
public boolean isAccountNonLocked() {
return false;
}
@Override
public boolean isCredentialsNonExpired() {
return false;
}
@Override
public boolean isEnabled() {
return f... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\mongoauth\domain\User.java | 1 |
请完成以下Java代码 | public static ShipmentScheduleAvailableStock of()
{
return EMPTY;
}
private static final ShipmentScheduleAvailableStock EMPTY = new ShipmentScheduleAvailableStock();
private final ImmutableList<ShipmentScheduleAvailableStockDetail> list;
private ShipmentScheduleAvailableStock(@NonNull final Collection<Shipmen... | }
public BigDecimal getQtyAvailable(final int storageIndex)
{
return getStorageDetail(storageIndex).getQtyAvailable();
}
public void subtractQtyOnHand(final int storageIndex, @NonNull final BigDecimal qtyOnHandToRemove)
{
getStorageDetail(storageIndex).subtractQtyOnHand(qtyOnHandToRemove);
}
public Shipme... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\inout\util\ShipmentScheduleAvailableStock.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private File createFile(String bill_date, String stringResult, String dir) throws IOException {
// 创建本地文件,用于存储支付宝对账文件
// String dir = "/home/roncoo/app/accountcheck/billfile/alipay";
File file = new File(dir, bill_date + "_" + ".xml");
int index = 1;
// 判断文件是否已经存在
while (file.exists()) {
file = new File... | try {
// 把支付宝返回数据写入文件
FileWriter fileWriter = new FileWriter(file);
fileWriter.write(stringResult);
fileWriter.close(); // 关闭数据流
} catch (IOException e) {
LOG.info("把支付宝返回的对账数据写入文件异常:" + e);
}
return file;
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\fileDown\impl\AlipayFileDown.java | 2 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@return Comment or Hint
*/
public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Nam... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_C_TaxType.java | 1 |
请完成以下Java代码 | private ProjectId createNewSalesPurchaseOrderProject(final @NonNull I_C_Order purchaseOrder)
{
final BPartnerId bpartnerId = BPartnerId.ofRepoId(purchaseOrder.getC_BPartner_ID());
return projectService.createProject(CreateProjectRequest.builder()
.projectCategory(ProjectCategory.SalesPurchaseOrder)
.orgId(... | .forEach(ol -> {
ol.setC_Project_ID(newProjectId.getRepoId());
poLinesUpdated.put(OrderAndLineId.ofRepoIds(ol.getC_Order_ID(), ol.getC_OrderLine_ID()), ol);
});
if (poLinesUpdated.isEmpty())
{
return;
}
InterfaceWrapperHelper.saveAll(poLinesUpdated.values());
eventDispatcher.fireProjectCrea... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\model\interceptor\C_Order_Project.java | 1 |
请完成以下Java代码 | public void onResponse(ResponseEvent event) {
if (isActive) {
snmpTransportContext.getSnmpTransportService().processResponseEvent(this, event);
}
}
public void initializeTarget(SnmpDeviceProfileTransportConfiguration profileTransportConfig, SnmpDeviceTransportConfiguration deviceTra... | @Override
public void onRemoteSessionCloseCommand(UUID sessionId, SessionCloseNotificationProto sessionCloseNotification) {
log.trace("[{}] Received the remote command to close the session: {}", sessionId, sessionCloseNotification.getMessage());
if (sessionCloseNotification.getMessage().equals(Defau... | repos\thingsboard-master\common\transport\snmp\src\main\java\org\thingsboard\server\transport\snmp\session\DeviceSessionContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isAfter(@NonNull final DateAndSeqNo other)
{
// note that we avoid using equals here, a timestamp and a date that are both "Date" might not be equal even if they have the same time.
if (date.isAfter(other.getDate()))
{
return true;
}
if (date.isBefore(other.getDate()))
{
return false;
... | if (other == null)
{
return this;
}
else
{
return this.isBefore(other) ? this : other;
}
}
public DateAndSeqNo max(@Nullable final DateAndSeqNo other)
{
if (other == null)
{
return this;
}
return this.isAfter(other) ? this : other;
}
public DateAndSeqNo withOperator(@Nullable final Ope... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\DateAndSeqNo.java | 2 |
请完成以下Java代码 | public class CreateHumanTaskAfterContext {
protected HumanTask humanTask;
protected TaskEntity taskEntity;
protected PlanItemInstanceEntity planItemInstanceEntity;
public CreateHumanTaskAfterContext() {
}
public CreateHumanTaskAfterContext(HumanTask humanTask, TaskEntity task... | public TaskEntity getTaskEntity() {
return taskEntity;
}
public void setTaskEntity(TaskEntity taskEntity) {
this.taskEntity = taskEntity;
}
public PlanItemInstanceEntity getPlanItemInstanceEntity() {
return planItemInstanceEntity;
}
public void setPlanItemInstanceEntit... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\interceptor\CreateHumanTaskAfterContext.java | 1 |
请完成以下Java代码 | public void mouseReleased(final MouseEvent e)
{
// nothing to do
}
@Override
public void mouseClicked(final MouseEvent e)
{
if (e == null || listBox.getSelectedValue().equals(ITEM_More))
{
setUserObject(null);
return;
}
popup.setVisible(false); // 02027: tsa: hide popup when an item is selected
... | return textBox.getText();
}
protected final int getTextCaretPosition()
{
return textBox.getCaretPosition();
}
protected final void setTextCaretPosition(final int caretPosition)
{
textBox.setCaretPosition(caretPosition);
}
protected final void setText(final String text)
{
textBox.setText(text);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\FieldAutoCompleter.java | 1 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
long temp;
temp = Double.doubleToLongBits(length);
result = prime * result + (int) (temp ^ (temp >>> 32));
temp = Double.doubleToLongBits(width);
result = prime * result + (int) (temp ^ (temp >>> 32));
... | return false;
if (Double.doubleToLongBits(width) != Double.doubleToLongBits(other.width))
return false;
return true;
}
protected double getWidth() {
return width;
}
protected double getLength() {
return length;
}
} | repos\tutorials-master\core-java-modules\core-java-lang-8\src\main\java\com\baeldung\equalshashcode\entities\Rectangle.java | 1 |
请完成以下Java代码 | public void setIsInboundEMail (boolean IsInboundEMail)
{
set_Value (COLUMNNAME_IsInboundEMail, Boolean.valueOf(IsInboundEMail));
}
/** Get Inbound EMail.
@return Inbound EMail */
@Override
public boolean isInboundEMail ()
{
Object oo = get_Value(COLUMNNAME_IsInboundEMail);
if (oo != null)
{
if ... | @Override
public int getR_Request_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_R_Request_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Betreff.
@param Subject
Mail Betreff
*/
@Override
public void setSubject (java.lang.String Subject)
{
set_Value (COLUMNNAME_Subject, ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Mail.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: demo-consumer
cloud:
# Nacos 作为注册中心的配置项
nacos:
discovery:
server-addr: 127.0.0.1:8848
# Dubbo 配置项,对应 DubboConfigurationProperties 类
dubbo:
# Dubbo 服务注册中心配置,对应 RegistryConfig 类
registry:
address: spring-cloud://127.0.0.1:8848 # 指定 Dubbo 服务注册中心的地址
| # Spring Cloud Alibaba Dubbo 专属配置项,对应 DubboCloudProperties 类
cloud:
subscribed-services: demo-provider # 设置订阅的应用列表,默认为 * 订阅所有应用。 | repos\SpringBoot-Labs-master\labx-07-spring-cloud-alibaba-dubbo\labx-07-sca-dubbo-demo01\labx-07-sca-dubbo-demo01-consumer\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public String getSummary()
{
final StringBuilder sb = new StringBuilder();
if (countImportRecordsConsidered.isPresent() && countImportRecordsConsidered.getAsInt() > 0)
{
if (sb.length() > 0) {sb.append("; ");}
sb.append(countImportRecordsConsidered.getAsInt()).append(" record(s) processed");
}
if (!e... | public boolean hasErrors()
{
return !getErrors().isEmpty();
}
public int getCountErrors()
{
return getErrors().size();
}
@Value
@Builder
public static class Error
{
@NonNull String message;
@NonNull AdIssueId adIssueId;
@Nullable transient Throwable exception;
int affectedImportRecordsCount;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\ActualImportRecordsResult.java | 1 |
请完成以下Java代码 | public boolean isShowHUPINameNextLine()
{
return showHUPINameNextLine;
}
@Override
public IHUDisplayNameBuilder setShowHUPINameNextLine(final boolean showHUPINameNextLine)
{
this.showHUPINameNextLine = showHUPINameNextLine;
return this;
}
protected String getHUValue()
{
final I_M_HU hu = getM_HU();
... | }
HuPackingInstructionsId includedPIId = HuPackingInstructionsId.ofRepoIdOrNull(parentPIItem.getIncluded_HU_PI_ID());
if (includedPIId == null)
{
//noinspection ThrowableNotThrown
new HUException("Aggregate HU's parent item has M_HU_PI_Item without an Included_HU_PI; parent-item=" + parentItem).throwIfDeve... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUDisplayNameBuilder.java | 1 |
请完成以下Java代码 | protected String doIt()
{
StreamUtils.dice(streamDocumentsToRepost(), 1000)
.forEach(this::enqueueChunk);
return MSG_OK;
}
private void enqueueChunk(final Collection<DocumentToRepost> documentsToRepost)
{
FactAcctRepostCommand.builder()
.documentsToRepost(documentsToRepost)
.forcePosting(forcePo... | }
private DocumentToRepost extractDocumentToRepostFromRegularRow(final IViewRow row)
{
final int adTableId = adTablesRepo.retrieveTableId(getTableName());
final int recordId = row.getId().toInt();
final ClientId adClientId = ClientId.ofRepoId(row.getFieldValueAsInt(I_Fact_Acct.COLUMNNAME_AD_Client_ID, -1));
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\accounting\process\WEBUI_Fact_Acct_Repost_ViewRows.java | 1 |
请完成以下Java代码 | public void setAD_User_SortPref_Line_ID (int AD_User_SortPref_Line_ID)
{
if (AD_User_SortPref_Line_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_User_SortPref_Line_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_SortPref_Line_ID, Integer.valueOf(AD_User_SortPref_Line_ID));
}
/** Get Sortierbegriff pro Be... | {
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
@Override
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_SortPref_Line.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DbTemplate {
/**
* 模拟数据库存储 user_id <-> session_id 的关系
*/
public static final ConcurrentHashMap<String, UUID> DB = new ConcurrentHashMap<>();
/**
* 获取所有SessionId
*
* @return SessionId列表
*/
public List<UUID> findAll() {
return CollUtil.newArrayList(DB.va... | *
* @param userId 用户id
* @param sessionId SessionId
*/
public void save(String userId, UUID sessionId) {
DB.put(userId, sessionId);
}
/**
* 删除 user_id <-> session_id 的关系
*
* @param userId 用户id
*/
public void deleteByUserId(String userId) {
DB.remove... | repos\spring-boot-demo-master\demo-websocket-socketio\src\main\java\com\xkcoding\websocket\socketio\config\DbTemplate.java | 2 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Error.
@param IsError
An Err... | }
/** Set Summary.
@param Summary
Textual summary of this request
*/
public void setSummary (String Summary)
{
set_Value (COLUMNNAME_Summary, Summary);
}
/** Get Summary.
@return Textual summary of this request
*/
public String getSummary ()
{
return (String)get_Value(COLUMNNAME_Summary);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AlertProcessorLog.java | 1 |
请完成以下Java代码 | private PInstanceId getOrCreateRecordsToImportSelectionId()
{
if (_recordsToImportSelectionId == null)
{
final ImportTableDescriptor importTableDescriptor = importFormat.getImportTableDescriptor();
final DataImportRunId dataImportRunId = getOrCreateDataImportRunId();
final IQuery<Object> query = queryBL.... | private DataImportResult createResult()
{
final Duration duration = Duration.between(startTime, SystemTime.asInstant());
return DataImportResult.builder()
.dataImportConfigId(dataImportConfigId)
.duration(duration)
//
.insertIntoImportTable(insertIntoImportTableResult)
.importRecordsValidation... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\DataImportCommand.java | 1 |
请完成以下Java代码 | public String toString()
{
return "AtomNode{" +
"word='" + sWord + '\'' +
", nature=" + nPOS +
'}';
}
public static Vertex convert(String word, int type)
{
String name = word;
Nature nature = Nature.n;
int dValue = 1;
... | // nature = Nature.m;
// word = Predefine.TAG_NUMBER;
// } else
// {
nature = Nature.nx;
word = Predefine.TAG_CLUSTER;
// }
break;
default:
break;
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\NShort\Path\AtomNode.java | 1 |
请完成以下Java代码 | public class UOMConversionRate
{
UomId fromUomId;
UomId toUomId;
@Getter(AccessLevel.NONE)
BigDecimal fromToMultiplier;
@Getter(AccessLevel.NONE)
BigDecimal toFromMultiplier;
boolean catchUOMForProduct;
@Builder
private UOMConversionRate(
@NonNull final UomId fromUomId,
@NonNull final UomId toUomId,
... | {
return computeInvertedMultiplier(toFromMultiplier);
}
}
public static BigDecimal computeInvertedMultiplier(@NonNull final BigDecimal multiplier)
{
if (multiplier.signum() == 0)
{
throw new AdempiereException("Multiplier shall not be ZERO");
}
return NumberUtils.stripTrailingDecimalZeros(BigDecimal... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\UOMConversionRate.java | 1 |
请完成以下Java代码 | public boolean isIgnoreInvoiceSchedule()
{
if (ignoreInvoiceSchedule != null)
{
return ignoreInvoiceSchedule;
}
else if (defaults != null)
{
return defaults.isIgnoreInvoiceSchedule();
}
else
{
return false;
}
}
public void setIgnoreInvoiceSchedule(final boolean ignoreInvoiceSchedule)
{
... | @Nullable
@Override
public BigDecimal getCheck_NetAmtToInvoice()
{
if (check_NetAmtToInvoice != null)
{
return check_NetAmtToInvoice;
}
else if (defaults != null)
{
return defaults.getCheck_NetAmtToInvoice();
}
return null;
}
@Override
public boolean isStoreInvoicesInResult()
{
if (storeI... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\PlainInvoicingParams.java | 1 |
请完成以下Spring Boot application配置 | spring.docker.compose.enabled=true
spring.docker.compose.file=./connectiondetails/docker/docker-compose-rabbitmq.yml
spring.docker.compose.skip.in-tests=false
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.mustache.check-template-location=false
spring.profiles.active=rabbitmq
spring.autoco... | sandraRepositoriesAutoConfiguration, org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration, org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration, org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration, org.springframework.boot.autoconfigure.kafka.Kafka... | repos\tutorials-master\spring-boot-modules\spring-boot-3-2\src\main\resources\connectiondetails\application-rabbitmq.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
@ApiModelProperty(example = "The One Task Case")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
... | }
@ApiModelProperty(example = "This is a case for testing purposes")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public void setDiagramResource(String diagramResource) {
this.... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\CaseDefinitionResponse.java | 2 |
请完成以下Java代码 | public int getAD_User_Attribute_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_User_Attribute_ID);
}
@Override
public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, AD_User_ID);
}
@Override... | */
public static final int ATTRIBUTE_AD_Reference_ID=541332;
/** Delegate = D */
public static final String ATTRIBUTE_Delegate = "D";
/** Politician = P */
public static final String ATTRIBUTE_Politician = "P";
/** Rechtsberater = R */
public static final String ATTRIBUTE_Rechtsberater = "R";
/** Schätzer = S *... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Attribute.java | 1 |
请完成以下Java代码 | public void start() {
commandExecutor.execute(new StartPlanItemInstanceCmd(planItemInstanceId, variables, formVariables, formOutcome,
formInfo, localVariables, transientVariables, childTaskVariables, childTaskFormVariables,
childTaskFormOutcome, childTaskFormInfo));
}
... | @Override
public void forceCompleteStage() {
validateChildTaskVariablesNotSet();
commandExecutor.execute(new CompleteStagePlanItemInstanceCmd(planItemInstanceId, variables, formVariables, formOutcome,
formInfo, localVariables, transientVariables, true));
}
protected void va... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\PlanItemInstanceTransitionBuilderImpl.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8081
spring:
application:
name: publisher-demo
# Bus 相关配置项,对应 BusProperties
cloud:
bus:
enabled: true # 是否开启,默认为 true
destination: springCloudBus # 目标消息队列,默认为 springCloudBus
# r | ocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv | repos\SpringBoot-Labs-master\labx-20\labx-20-sca-bus-rocketmq-demo-publisher\src\main\resources\application.yml | 2 |
请完成以下Java代码 | private static LocatorId findDestinationLocatorOrNull(@NonNull final I_M_InOutLine receiptLine)
{
final IReceiptScheduleDAO receiptScheduleDAO = Services.get(IReceiptScheduleDAO.class);
final List<I_M_ReceiptSchedule> receiptScheduleRecords = receiptScheduleDAO.retrieveRsForInOutLine(receiptLine);
return findDe... | return null;
}
final IWarehouseBL warehouseBL = Services.get(IWarehouseBL.class);
final I_M_Warehouse targetWarehouse = loadOutOfTrx(warehouseDestRepoId, I_M_Warehouse.class);
final I_M_Locator locatorTo = warehouseBL.getOrCreateDefaultLocator(targetWarehouse);
// Skip if we don't have a target warehouse
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\api\ReceiptLineFindForwardToLocatorTool.java | 1 |
请完成以下Java代码 | public void setQtyShipped_CatchWeight_UOM_ID (final int QtyShipped_CatchWeight_UOM_ID)
{
if (QtyShipped_CatchWeight_UOM_ID < 1)
set_Value (COLUMNNAME_QtyShipped_CatchWeight_UOM_ID, null);
else
set_Value (COLUMNNAME_QtyShipped_CatchWeight_UOM_ID, QtyShipped_CatchWeight_UOM_ID);
}
@Override
public int ge... | public int getRecord_ID()
{
return get_ValueAsInt(COLUMNNAME_Record_ID);
}
@Override
public void setReplicationTrxErrorMsg (final @Nullable java.lang.String ReplicationTrxErrorMsg)
{
throw new IllegalArgumentException ("ReplicationTrxErrorMsg is virtual column"); }
@Override
public java.lang.String getRep... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java-gen\de\metas\ordercandidate\model\X_C_OLCand.java | 1 |
请完成以下Java代码 | public JSONLookupValuesPage getAttributeTypeahead(
@PathVariable("asiDocId") final String asiDocIdStr,
@PathVariable("attributeName") final String attributeName,
@RequestParam(name = "query") final String query)
{
userSession.assertLoggedIn();
final DocumentId asiDocId = DocumentId.of(asiDocIdStr);
ret... | public JSONLookupValue complete(
@PathVariable("asiDocId") final String asiDocIdStr,
@RequestBody final JSONCompleteASIRequest request)
{
userSession.assertLoggedIn();
final DocumentId asiDocId = DocumentId.of(asiDocIdStr);
return Execution.callInNewExecution("complete", () -> completeInTrx(asiDocId, req... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pattribute\ASIRestController.java | 1 |
请完成以下Java代码 | public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getOpenType() {
return openType;
}
public void setOpenType(String openType) {
this.openType = openType;
}
public String getOpenPage() {
... | }
public void setOpenPage(String openPage) {
this.openPage = openPage;
}
public static SysAnnmentTypeEnum getByType(String type) {
if (oConvertUtils.isEmpty(type)) {
return null;
}
for (SysAnnmentTypeEnum val : values()) {
if (val.getType().equals(ty... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\constant\enums\SysAnnmentTypeEnum.java | 1 |
请完成以下Java代码 | public Object get(Object key) {
return key instanceof String ? cachingResolver.resolveProperty((String) key) : delegate.get(key);
}
@Override
public Object getOrDefault(Object key, Object defaultValue) {
return key instanceof String ? cachingResolver.resolveProperty((String) key) : delegate... | @Override
public boolean hasNext() {
return delegate.hasNext();
}
@Override
public Entry<String, Object> next() {
Entry<String, Object> entry = delegate.next();
return new AbstractMap.SimpleEntry<>(entry.getKey(), cachingResolver.resolveProperty(entry... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\caching\EncryptableMapWrapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AcctSchemaId implements RepoIdAware
{
@JsonCreator
@NonNull
public static AcctSchemaId ofRepoId(final int repoId)
{
return new AcctSchemaId(repoId);
}
@Nullable
public static AcctSchemaId ofRepoIdOrNull(final int repoId)
{
if (repoId <= 0)
{
return null;
}
else
{
return ofRepoId(... | return id != null ? id.getRepoId() : -1;
}
int repoId;
private AcctSchemaId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_AcctSchema_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static boolean equals(
@Nullable final AcctSchemaId id1,
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\AcctSchemaId.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RecurrentNonBusinessDay implements NonBusinessDay
{
@NonNull
RecurrentNonBusinessDayFrequency frequency;
@NonNull
LocalDate startDate;
@Nullable
LocalDate endDate;
@Nullable
String name;
@Override
public boolean isMatching(@NonNull final LocalDate date)
{
if (!isInRange(date))
{
return... | return true;
}
currentDate = currentDate.plusYears(1);
}
return false;
}
else
{
throw new AdempiereException("Unknown frequency type: " + frequency);
}
}
private boolean isInRange(@NonNull final LocalDate date)
{
// Before start date
if (date.compareTo(startDate) < 0)
{
return fa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\calendar\RecurrentNonBusinessDay.java | 2 |
请完成以下Java代码 | public String getPriority() {
return priority;
}
public void setPriority(String priority) {
this.priority = priority;
}
public String getAdmin() {
return admin;
}
public void setAdmin(String admin) {
this.admin = admin;
}
public String getConcurrency()... | public String getExecutor() {
return executor;
}
public void setExecutor(String executor) {
this.executor = executor;
}
public String getAckMode() {
return ackMode;
}
public void setAckMode(String ackMode) {
this.ackMode = ackMode;
}
} | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\RabbitInboundChannelModel.java | 1 |
请完成以下Java代码 | private ImmutableMap<ProductId, Quantity> divideQuantities(
@NonNull final ImmutableMap<ProductId, Quantity> productsAndQuantities,
final int divisor)
{
final ImmutableSet<Entry<ProductId, Quantity>> entrySet = productsAndQuantities.entrySet();
final BigDecimal divisorBD = new BigDecimal(divisor);
re... | this.hus.put(idWithHuBuilder.getLeft(), idWithHuBuilder.getRight());
}
public boolean isEmpty()
{
return huIds.isEmpty();
}
public IPair<HuId, HUBuilder> peek()
{
final HuId huId = this.huIds.get(huIds.size() - 1);
final HUBuilder huBuilder = this.hus.get(huId);
return ImmutablePair.of(huId, ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\generichumodel\HURepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ResponseEntity<Order> create(@RequestBody OrderForm form) {
List<OrderProductDto> formDtos = form.getProductOrders();
validateProductsExistence(formDtos);
Order order = new Order();
order.setStatus(OrderStatus.PAID.name());
order = this.orderService.create(order);
... | .getId())))
.collect(Collectors.toList());
if (!CollectionUtils.isEmpty(list)) {
new ResourceNotFoundException("Product not found");
}
}
public static class OrderForm {
private List<OrderProductDto> productOrders;
public List<OrderProductDto> getProductO... | repos\tutorials-master\spring-boot-modules\spring-boot-angular\src\main\java\com\baeldung\ecommerce\controller\OrderController.java | 2 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getApp() {
return app;
}
public void setApp(String app) {
this.app = app;
}
public Long getTimestamp() {
return timestamp;
}
public void setT... | public Long getBlockQps() {
return blockQps;
}
public void setBlockQps(Long blockQps) {
this.blockQps = blockQps;
}
public Long getSuccessQps() {
return successQps;
}
public void setSuccessQps(Long successQps) {
this.successQps = successQps;
}
public L... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\vo\MetricVo.java | 1 |
请完成以下Java代码 | public Class<? extends BaseElement> getHandledType() {
return IntermediateCatchEvent.class;
}
@Override
protected void executeParse(BpmnParse bpmnParse, IntermediateCatchEvent intermediateCatchEvent) {
EventDefinition eventDefinition = null;
if (!intermediateCatchEvent.getEventDefin... | }
}
}
intermediateCatchEvent.setBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateCatchEventActivityBehavior(intermediateCatchEvent));
} else {
if (eventDefinition instanceof TimerEventDefinition ||
eventDefinition instan... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\parser\handler\IntermediateCatchEventParseHandler.java | 1 |
请完成以下Java代码 | private void init()
{
ColumnInfo[] s_layoutRelated = new ColumnInfo[] {
new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class),
new ColumnInfo(
Msg.translate(Env.getCtx(), "Value"),
"(Select Value from M_Product p where p.M_Product_ID=M_PRODUCT_SUBSTITUTERELATED_V.Subst... | }
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
}
}
public java.awt.Component getComponent()
{
return (java.awt.Component)relatedTbl;
}
@Override
public void refresh(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, int M_PriceList_Version_ID)
{
refresh( M_Produc... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoProductRelated.java | 1 |
请完成以下Java代码 | public Collection<T> provideVariables() {
if (variables == null) {
return new ArrayList<T>();
}
else {
return variables;
}
}
@Override
public Collection<T> provideVariables(Collection<String> variablesNames) {
if (variablesNames == null) {
return provideVariables();
}
... | if (variables != null) {
for (T variable : variables) {
if (variablesNames.contains(variable.getName())) {
result.add(variable);
}
}
}
return result;
}
public static <T extends CoreVariableInstance> VariableCollectionProvider<T> emptyVariables() {
return new Variab... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\variable\scope\VariableCollectionProvider.java | 1 |
请完成以下Java代码 | public class SysThirdAccount {
/**编号*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "编号")
private java.lang.String id;
/**第三方登录id*/
@Excel(name = "第三方登录id", width = 15)
@Schema(description = "第三方登录id")
private java.lang.String sysUserId;
/**登录来源*/
@Excel(name = "登录来源", width = 15)
@Schema(des... | /**创建人*/
@Excel(name = "创建人", width = 15)
private java.lang.String createBy;
/**创建日期*/
@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private java.util.Date creat... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysThirdAccount.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DispatcherServletRegistrationBean extends ServletRegistrationBean<DispatcherServlet>
implements DispatcherServletPath {
private final String path;
/**
* Create a new {@link DispatcherServletRegistrationBean} instance for the given
* servlet and path.
* @param servlet the dispatcher servlet
* ... | public String getPath() {
return this.path;
}
@Override
public void setUrlMappings(Collection<String> urlMappings) {
throw new UnsupportedOperationException("URL Mapping cannot be changed on a DispatcherServlet registration");
}
@Override
public void addUrlMappings(String... urlMappings) {
throw new Unsup... | repos\spring-boot-4.0.1\module\spring-boot-webmvc\src\main\java\org\springframework\boot\webmvc\autoconfigure\DispatcherServletRegistrationBean.java | 2 |
请完成以下Java代码 | public Builder type(String type) {
this.type = type;
return this;
}
/**
* Annotate the parameter with the specified annotation.
* @param className the class of the annotation
* @return this for method chaining
* @deprecated in favor of {@link #singleAnnotate(ClassName)} and
* {@link #repeatabl... | /**
* Annotate the parameter with the specified repeatable annotation.
* @param className the class of the annotation
* @return this for method chaining
*/
public Builder repeatableAnnotate(ClassName className) {
return repeatableAnnotate(className, null);
}
/**
* Annotate the parameter with th... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\Parameter.java | 1 |
请完成以下Java代码 | public String getDbName()
{
return getProperty(PROP_DB_NAME, "metasfresh");
}
public String getDbUser()
{
return getProperty(PROP_DB_USER, "metasfresh");
}
public String getDbType()
{
return getProperty(PROP_DB_TYPE, "postgresql");
}
public String getDbHostname()
{
return getProperty(PROP_DB_SERVER... | {
final HashMap<Object, Object> result = new HashMap<>(properties);
result.put(PROP_DB_PASSWORD, "******");
return result.toString();
}
public DBConnectionSettings toDBConnectionSettings()
{
return DBConnectionSettings.builder()
.dbHostname(getDbHostname())
.dbPort(getDbPort())
.dbName(getDbName... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\DBConnectionSettingProperties.java | 1 |
请完成以下Java代码 | abstract class LazyDelegatingInputStream extends InputStream {
private volatile InputStream in;
@Override
public int read() throws IOException {
return in().read();
}
@Override
public int read(byte[] b) throws IOException {
return in().read(b);
}
@Override
public int read(byte[] b, int off, int len) th... | }
}
@Override
public synchronized void reset() throws IOException {
in().reset();
}
private InputStream in() throws IOException {
InputStream in = this.in;
if (in == null) {
synchronized (this) {
in = this.in;
if (in == null) {
in = getDelegateInputStream();
this.in = in;
}
}
... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\LazyDelegatingInputStream.java | 1 |
请完成以下Java代码 | public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/**
* PerformanceType AD_Reference_ID=540689
* ... | return (java.lang.String)get_Value(COLUMNNAME_PerformanceType);
}
/** Set Suchschlüssel.
@param Value
Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Override
public void setValue (java.lang.String Value)
{
set_ValueNoCheck (COLUMNNAME_Value, Value);
}
/** Get Suchsch... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inout\model\X_M_QualityNote.java | 1 |
请完成以下Java代码 | public void setC_PaymentTerm_ID (final int C_PaymentTerm_ID)
{
if (C_PaymentTerm_ID < 1)
set_Value (COLUMNNAME_C_PaymentTerm_ID, null);
else
set_Value (COLUMNNAME_C_PaymentTerm_ID, C_PaymentTerm_ID);
}
@Override
public int getC_PaymentTerm_ID()
{
return get_ValueAsInt(COLUMNNAME_C_PaymentTerm_ID);
... | public static final String REFERENCEDATETYPE_InvoiceDate = "IV";
/** BLDate = BL */
public static final String REFERENCEDATETYPE_BLDate = "BL";
/** OrderDate = OD */
public static final String REFERENCEDATETYPE_OrderDate = "OD";
/** LCDate = LC */
public static final String REFERENCEDATETYPE_LCDate = "LC";
/** E... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrderPaySchedule.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws Exception {
ApplicationContext context = SpringApplication.run(RedisSentinelApplication.class, args);
var template = context.getBean(StringRedisTemplate.class);
template.opsForValue().set("loop-forever", "0");
var stopWatch = new StopWatch();
while (true) {
... | public @Bean RedisConnectionFactory connectionFactory() {
return new LettuceConnectionFactory(sentinelConfig(), LettuceClientConfiguration.defaultConfiguration());
}
public @Bean RedisSentinelConfiguration sentinelConfig() {
return SENTINEL_CONFIG;
}
/**
* Clear database before shut down.
*/
public @PreD... | repos\spring-data-examples-main\redis\sentinel\src\main\java\example\springdata\redis\sentinel\RedisSentinelApplication.java | 1 |
请完成以下Java代码 | public Map<String, Long> countStudentsByCourse() {
ViewQuery query = ViewQuery.from("studentGrades", "countStudentsByCourse")
.reduce()
.groupLevel(1);
ViewResult result = bucket.query(query);
Map<String, Long> numStudentsByCourse = new HashMap<>();
... | public Map<String, Long> sumGradePointsByStudent() {
ViewQuery query = ViewQuery.from("studentGrades", "sumGradePointsByStudent")
.reduce()
.groupLevel(1);
ViewResult result = bucket.query(query);
Map<String, Long> gradePointsByStudent = new HashMap<>();
... | repos\tutorials-master\persistence-modules\couchbase\src\main\java\com\baeldung\couchbase\mapreduce\StudentGradeService.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.