instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public String toString()
{
return "Partition [DLM_Partition_ID=" + DLM_Partition_ID + ", records.size()=" + records.size() + ", recordsChanged=" + recordsChanged + ", configChanged=" + configChanged + ", targetDLMLevel=" + targetDLMLevel + ", currentDLMLevel=" + currentDLMLevel + ", nextInspectionDate=" + nextInspec... | public ITableRecordReference getTableRecordReference()
{
return tableRecordReference;
}
public int getDLM_Partition_Workqueue_ID()
{
return dlmPartitionWorkqueueId;
}
public void setDLM_Partition_Workqueue_ID(final int dlm_Partition_Workqueue_ID)
{
dlmPartitionWorkqueueId = dlm_Partition_Workq... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\Partition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RedisLockService {
private Logger logger = LoggerFactory.getLogger(RedisLockService.class);
private static final long DEFAULT_EXPIRE_UNUSED = 60000L;
private final RedisLockRegistry redisLockRegistry;
public void lock(String lockKey) {
Lock lock = obtainLock(lockKey);
lo... | }
public void unlock(String lockKey) {
try {
Lock lock = obtainLock(lockKey);
lock.unlock();
redisLockRegistry.expireUnusedOlderThan(DEFAULT_EXPIRE_UNUSED);
} catch (Exception e) {
logger.error("分布式锁 [{}] 释放异常", lockKey, e);
}
}
priva... | repos\spring-boot-best-practice-master\spring-boot-redis\src\main\java\cn\javastack\springboot\redis\service\RedisLockService.java | 2 |
请完成以下Java代码 | public int getGeocodingConfig_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GeocodingConfig_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/**
* GeocodingProvider AD_Reference_ID=541051
* Reference name: Geocoding Providers
*/
public static final int GEOCODINGPROVIDER_AD_Reference_ID... | {
return (java.lang.String)get_Value(COLUMNNAME_gmaps_ApiKey);
}
/** Set Open Street Maps - Basis-URL.
@param osm_baseURL
The Base URL after which all parameters are added
*/
@Override
public void setosm_baseURL (java.lang.String osm_baseURL)
{
set_Value (COLUMNNAME_osm_baseURL, osm_baseURL);
}
/**... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GeocodingConfig.java | 1 |
请完成以下Java代码 | private void action_treeAdd(ListItem item)
{
log.info("Item=" + item);
if (item != null)
{
MTreeNode info = new MTreeNode(item.id, 0, item.name, item.description, -1,
item.isSummary, item.imageIndicator, false, null);
centerTree.nodeChanged(true, info);
// May cause Error if in tree
addNode(... | for (index = 0; index < size; index++)
{
ListItem item = (ListItem)model.getElementAt(index);
action_treeAdd(item);
}
} // action_treeAddAll
/**
* Action: Delete All Nodes from Tree
*/
private void action_treeDeleteAll()
{
log.info("");
ListModel model = centerList.getModel();
int size = mode... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\VTreeMaintenance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class User {
protected User() {
}
@Id
@GeneratedValue
private Integer id;
@Size(min=2, message = "Name should have atleast 2 characters")
//@JsonProperty("user_name")
private String name;
@Past(message = "Birth Date should be in the past")
//@JsonProperty("birth_date")
private LocalDate bir... | public void setBirthDate(LocalDate birthDate) {
this.birthDate = birthDate;
}
public List<Post> getPosts() {
return posts;
}
public void setPosts(List<Post> posts) {
this.posts = posts;
}
@Override
public String toString() {
return "User [id=" + id + ", name=" + name + ", birthDate=" + birthDate + "]"... | repos\master-spring-and-spring-boot-main\12-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\user\User.java | 2 |
请完成以下Java代码 | public class AddIdentityLinkForCaseInstanceCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
protected String caseInstanceId;
protected String userId;
protected String groupId;
protected String type;
public AddIdentityLinkForCaseInstanceCmd(Strin... | @Override
public Void execute(CommandContext commandContext) {
CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);
CaseInstanceEntityManager caseInstanceEntityManager = cmmnEngineConfiguration.getCaseInstanceEntityManager();
CaseIn... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\AddIdentityLinkForCaseInstanceCmd.java | 1 |
请完成以下Java代码 | public void setC_BPartner_ID (int C_BPartner_ID)
{
if (C_BPartner_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
}
/** Get Geschäftspartner.
@return Bezeichnet einen Geschäftspartner
*/
@Override
public ... | return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidFrom);
}
/** Set Gültig bis.
@param ValidTo
Gültig bis inklusiv (letzter Tag)
*/
@Override
public void setValidTo (java.sql.Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
}
/** Get Gültig bis.
@return Gültig bis inklusiv (letzter T... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\tax\model\X_C_VAT_SmallBusiness.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public org.springframework.messaging.converter.MessageConverter messageConverter()
{
return new MappingJackson2MessageConverter();
}
@Bean
public MessageHandlerMethodFactory messageHandlerMethodFactory()
{
final DefaultMessageHandlerMethodFactory factory = new DefaultMessageHandlerMethodFactory();
factory.s... | * <p>
* (although right now it doesn't need to work..)
*/
@Bean
public ConnectionNameStrategy connectionNameStrategy()
{
return connectionFactory -> appName;
}
@Bean
public EventBusMonitoringService eventBusMonitoringService(@NonNull final Optional<PerformanceMonitoringService> performanceMonitoringService... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\remote\rabbitmq\RabbitMQEventBusConfiguration.java | 2 |
请完成以下Java代码 | public void collectAndUpdate(final IFacetsPool<ModelType> facetsPool)
{
final IFacetCollectorResult<ModelType> result = collect();
facetsPool.updateFrom(result);
}
/**
* Sets the source from where the facets will be collected.
*
* @param dataSource
*/
public FacetCollectorRequestBuilder<ModelType> set... | public boolean acceptFacetCategory(final IFacetCategory facetCategory)
{
// Don't accept it if is excluded by includes/excludes list
if (!facetCategoryIncludesExcludes.build().test(facetCategory))
{
return false;
}
// Only categories which have "eager refresh" set (if asked)
if (onlyEagerRefreshCategor... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\FacetCollectorRequestBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SplitJobDemo {
@Autowired
private JobBuilderFactory jobBuilderFactory;
@Autowired
private StepBuilderFactory stepBuilderFactory;
@Bean
public Job splitJob() {
return jobBuilderFactory.get("splitJob")
.start(flow1())
.split(new SimpleAsyncTas... | return RepeatStatus.FINISHED;
}).build();
}
private Step step3() {
return stepBuilderFactory.get("step3")
.tasklet((stepContribution, chunkContext) -> {
System.out.println("执行步骤三操作。。。");
return RepeatStatus.FINISHED;
... | repos\SpringAll-master\67.spring-batch-start\src\main\java\cc\mrbird\batch\job\SplitJobDemo.java | 2 |
请完成以下Java代码 | public int getM_InventoryLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_InventoryLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Processed.
@param Processed
The document has been processed
*/
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_P... | set_Value (COLUMNNAME_ScrappedQty, ScrappedQty);
}
/** Get Scrapped Quantity.
@return The Quantity scrapped due to QA issues
*/
public BigDecimal getScrappedQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ScrappedQty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Target Quanti... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOutLineConfirm.java | 1 |
请完成以下Java代码 | public TablePrinter ident(int ident)
{
this.ident = ident;
return this;
}
@Override
public String toString()
{
final ArrayList<String> header = table.getHeader();
final ArrayList<Row> rowsList = table.getRowsList();
if (header.isEmpty() || rowsList.isEmpty())
{
return "";
}
final TabularString... | writer.lineEnd();
for (final String columnName : header)
{
writer.appendCell(row.getCellValue(columnName), getColumnWidth(columnName));
}
writer.lineEnd();
}
}
return writer.getAsString();
}
int getColumnWidth(final String columnName)
{
return columnWidths.computeIfAbsent(columnNam... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\text\tabular\TablePrinter.java | 1 |
请完成以下Java代码 | public class CaseExport implements CmmnXmlConstants {
public static void writeCase(CmmnModel model, Case caseModel, XMLStreamWriter xtw) throws Exception {
xtw.writeStartElement(ELEMENT_CASE);
xtw.writeAttribute(ATTRIBUTE_ID, caseModel.getId());
if (StringUtils.isNotEmpty(caseModel.get... | if (StringUtils.isNotEmpty(caseModel.getStartEventType()) && caseModel.getExtensionElements().get("eventType") == null) {
ExtensionElement extensionElement = new ExtensionElement();
extensionElement.setNamespace(FLOWABLE_EXTENSIONS_NAMESPACE);
extensionElement.setNamespacePrefix(FLOW... | repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\export\CaseExport.java | 1 |
请完成以下Java代码 | static ImmutableMap<String, String> extractTags(@Nullable final List<String> tagKeyValuePairs)
{
if (tagKeyValuePairs == null)
{
return ImmutableMap.of();
}
final ImmutableMap.Builder<String, String> tags = ImmutableMap.builder();
final int listSize = tagKeyValuePairs.size();
final int maxIndex = listS... | @NonNull final AttachmentEntry entry)
{
final AttachmentEntryId entryId = Check.assumeNotNull(entry.getId(), "Param 'entry' needs to have a non-null id; entry={}", entry);
final String attachmentId = Integer.toString(entryId.getRepoId());
return JsonAttachment.builder()
.externalReference(externalReference)... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\ordercandidates\impl\OrderCandidatesRestController.java | 1 |
请完成以下Java代码 | public class Person implements Serializable {
private static final long serialVersionUID = -7946768337975852352L;
@Id
private Name id;
/**
* 用户id
*/
private String uidNumber;
/**
* 用户名
*/
@DnAttribute(value = "uid", index = 1)
private String uid;
/**
* 姓... | */
private String mail;
/**
* 职位
*/
private String title;
/**
* 部门
*/
private String departmentNumber;
/**
* 部门id
*/
private String gidNumber;
/**
* 根目录
*/
private String homeDirectory;
/**
* loginShell
*/
private String ... | repos\spring-boot-demo-master\demo-ldap\src\main\java\com\xkcoding\ldap\entity\Person.java | 1 |
请完成以下Java代码 | public boolean evaluate(String sequenceFlowId, DelegateExecution execution) {
String conditionExpression = null;
if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) {
ObjectNode elementProperties = Context.getBpmnOverrideElementProperties(sequenceFlowId, executi... | protected String getActiveValue(String originalValue, String propertyName, ObjectNode elementProperties) {
String activeValue = originalValue;
if (elementProperties != null) {
JsonNode overrideValueNode = elementProperties.get(propertyName);
if (overrideValueNode != null) {
... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\el\UelExpressionCondition.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public String getCity() {
return city;
}
public void setName(String name) {
this.name = name;
}
public void setCity(String city) {
this.city = city;
}
public ComicUniversum getUniversum() {
return univer... | @Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Hero hero = (Hero) o;
return Objects.equals(name, hero.name) &&
Objects.equals(city, hero.city) &&
universum == hero.univ... | repos\spring-boot-demo-master (1)\src\main\java\com\github\sparsick\springbootexample\hero\universum\Hero.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WEBUI_Picking_RemoveHUFromPickingSlot extends PickingSlotViewBasedProcess
{
@Autowired
private PickingCandidateService pickingCandidateService;
@Override
protected ProcessPreconditionsResolution checkPreconditionsApplicable()
{
if (!getSelectedRowIds().isSingleDocumentId())
{
return ProcessPre... | @Override
protected String doIt()
{
final PickingSlotRow huRow = getSingleSelectedRow();
pickingCandidateService.removeHUFromPickingSlot(huRow.getHuId());
return MSG_OK;
}
@Override
protected void postProcess(final boolean success)
{
invalidatePickingSlotsView(); // right side
invalidatePackablesView(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_RemoveHUFromPickingSlot.java | 2 |
请完成以下Java代码 | public class GetAttachmentRouteContext
{
@NonNull
private final String orgCode;
@NonNull
private final String apiKey;
@NonNull
private final String tenant;
@NonNull
private final DocumentApi documentApi;
@NonNull
private final AttachmentApi attachmentApi;
@NonNull
private final UserApi userApi;
@NonN... | @NonNull
private Instant nextDocumentImportStartDate;
@NonNull
private Instant nextAttachmentImportStartDate;
@Nullable
private Document document;
@Nullable
private Attachment attachment;
public void setNextDocumentImportStartDate(@NonNull final Instant candidate)
{
if (candidate.isAfter(this.nextDocumen... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\attachment\GetAttachmentRouteContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getFREETEXT() {
return freetext;
}
/**
* Sets the value of the freetext property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFREETEXT(String value) {
this.freetext = value;
}
/**
* G... | * @return
* possible object is
* {@link DPLQU1 }
*
*/
public DPLQU1 getDPLQU1() {
return dplqu1;
}
/**
* Sets the value of the dplqu1 property.
*
* @param value
* allowed object is
* {@link DPLQU1 }
*
*/
public vo... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DLPIN1.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class LineItem {\n");
sb.append(" appliedPromotions: ").append(toIndentedString(appliedPromotions)).append("\n");
sb.append(" deliveryCost: ").append(toIndentedString(deliveryCost)).append("\n");
sb.append(" discountedLine... | return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o)
{
if (o == null)
{
return "null";
}
return o.toString().replace("\n", "\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\LineItem.java | 2 |
请完成以下Java代码 | public ResponseEntity<ApiError> badCredentialsException(BadCredentialsException e){
// 打印堆栈信息
String message = "坏的凭证".equals(e.getMessage()) ? "用户名或密码不正确" : e.getMessage();
log.error(message);
return buildResponseEntity(ApiError.error(message));
}
/**
* 处理自定义异常
*/
@Ex... | return buildResponseEntity(ApiError.error(NOT_FOUND.value(),e.getMessage()));
}
/**
* 处理所有接口数据验证异常
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<ApiError> handleMethodArgumentNotValidException(MethodArgumentNotValidException e){
// 打印堆栈信息
lo... | repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\exception\handler\GlobalExceptionHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Student {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String admitYear;
@Column(columnDefinition = "json")
private String address;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}... | return admitYear;
}
public void setAdmitYear(String admitYear) {
this.admitYear = admitYear;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-query-5\src\main\java\com\baeldung\spring\data\jpa\jsontypeexception\Student.java | 2 |
请完成以下Java代码 | private static ColorValue convertToColorValue(final Object value)
{
if (value == null)
{
return null;
}
else if (value instanceof ColorValue)
{
return (ColorValue)value;
}
else if (value instanceof String)
{
return ColorValue.ofHexString(value.toString());
}
else
{
throw new ValueConv... | {
super(message);
appendParametersToMessage();
}
public ValueConversionException(final Throwable cause)
{
super("Conversion failed because: " + cause.getLocalizedMessage(), cause);
appendParametersToMessage();
}
public ValueConversionException setFieldName(@Nullable final String fieldName)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DataTypes.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String getParentExternalIdentifier()
{
return ExternalIdentifierFormat.formatExternalId(parentPartnerCode.getPartnerCode());
}
@NonNull
private String getBPartnerExternalIdentifier(@NonNull final BPartnerRow bPartnerRow)
{
return buildExternalIdentifier(bPartnerRow.getPartnerCode().getPartnerCode(), b... | jsonRequestBPartner.setCode(bPartnerRow.getPartnerCode().getPartnerCode());
jsonRequestBPartner.setCompanyName(bPartnerRow.getName1());
jsonRequestBPartner.setName(bPartnerRow.getName1());
jsonRequestBPartner.setName2(bPartnerRow.getName2());
jsonRequestBPartner.setDescription(bPartnerRow.getSearchTerm());
f... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-sap-file-import\src\main\java\de\metas\camel\externalsystems\sap\bpartner\UpsertBPartnerRequestBuilder.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO (Properties ctx)
{
org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
return poi;
}
/** Set Zeile.
@param DataEntry_Line_ID Zeile */
@Override
public void setDataEntry_Line_ID (int DataEntry_Line_ID... | set_ValueNoCheck (COLUMNNAME_DataEntry_Section_ID, Integer.valueOf(DataEntry_Section_ID));
}
/** Get Sektion.
@return Sektion */
@Override
public int getDataEntry_Section_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_DataEntry_Section_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Line.java | 1 |
请完成以下Java代码 | public void addCellEditorListener(CellEditorListener l)
{
}
@Override
public void cancelCellEditing()
{
}
@Override
public Object getCellEditorValue()
{
return m_value;
}
@Override
public boolean isCellEditable(EventObject anEvent)
{
return false;
}
@Override
public void removeCellEditorListener... | @Override
public boolean shouldSelectCell(EventObject anEvent)
{
return false;
}
@Override
public boolean stopCellEditing()
{
return true;
}
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
{
m_value = value... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\TableCellNone.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void pushToMetasfresh(@NonNull final Rfq rfq)
{
final ISyncAfterCommitCollector syncAfterCommitCollector = senderToMetasfreshService.syncAfterCommit();
syncAfterCommitCollector.add(rfq);
}
@Override
@Transactional
public Rfq changeActiveRfq(
@NonNull final JsonChangeRfqRequest request,
@NonNull ... | return rfq;
}
@Override
public long getCountUnconfirmed(@NonNull final User user)
{
return rfqRepo.countUnconfirmed(user.getBpartner());
}
@Override
@Transactional
public void confirmUserEntries(@NonNull final User user)
{
final BPartner bpartner = user.getBpartner();
final List<Rfq> rfqs = rfqRepo.fin... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\service\impl\RfQService.java | 2 |
请完成以下Java代码 | public boolean isPrimitiveValueType() {
return false;
}
public TypedValue createValue(Object value, Map<String, Object> valueInfo) {
ObjectValueBuilder builder = Variables.objectValue(value);
if(valueInfo != null) {
applyValueInfo(builder, valueInfo);
}
return builder.create();
}
p... | if(valueInfo != null) {
applyValueInfo(builder, valueInfo);
}
return builder.create();
}
protected void applyValueInfo(ObjectValueBuilder builder, Map<String, Object> valueInfo) {
String objectValueTypeName = (String) valueInfo.get(VALUE_INFO_OBJECT_TYPE_NAME);
if (builder instanceof Serial... | repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\type\ObjectTypeImpl.java | 1 |
请完成以下Java代码 | protected static PathFilterRule createPathFilterRule(PathFilterConfig pathFilter,
String applicationPath) {
PathFilterRule pathFilterRule = new PathFilterRule();
for (PathMatcherConfig pathMatcherConfig : pathFilter.getDeniedPaths()) {
pathFilterRule... | *
* @return the checked request with authorization information attached
*/
public static Authorization authorize(String requestMethod, String requestUri, List<SecurityFilterRule> filterRules) {
Authorization authorization;
for (SecurityFilterRule filterRule : filterRules) {
authorization = filte... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\util\FilterRules.java | 1 |
请完成以下Java代码 | public Set<FlatrateTermId> retrieveAllRunningSubscriptionIds(
@NonNull final BPartnerId bPartnerId,
@NonNull final Instant date,
@NonNull final OrgId orgId)
{
return existingSubscriptionsQueryBuilder(orgId, bPartnerId, date)
.create()
.idsAsSet(FlatrateTermId::ofRepoId);
}
private IQueryBuilder<I... | public boolean bpartnerHasExistingRunningTerms(@NonNull final I_C_Flatrate_Term flatrateTerm)
{
if (flatrateTerm.getC_Order_Term_ID() <= 0)
{
return true; // if this term has no C_Order_Term_ID, then it *is* one of those running terms
}
final Instant instant = TimeUtil.asInstant(flatrateTerm.getC_Order_Term... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\FlatrateDAO.java | 1 |
请完成以下Java代码 | public Date calculateBestBeforeDate(
final Properties ctx,
final ProductId productId,
final BPartnerId vendorBPartnerId,
@NonNull final Date dateReceipt)
{
final I_M_Product product = productsService.getById(productId);
final OrgId orgId = OrgId.ofRepoId(product.getAD_Org_ID());
//
// Get Best-Befo... | }
public static boolean isInteger(@Nullable final UomId uomId)
{
return uomId != null && UomId.equals(uomId, UomId.EACH);
}
@Override
public boolean isStorageRelevant(@NonNull final AttributeId attributeId)
{
final I_M_Attribute attribute = getAttributeById(attributeId);
return attribute.isStorageRelevant... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributesBL.java | 1 |
请完成以下Java代码 | public void setUrl(String url) {
this.url = url;
}
public String getContentId() {
return contentId;
}
public void setContentId(String contentId) {
this.contentId = contentId;
}
public ByteArrayEntity getContent() {
return content;
}
public void setContent(ByteArrayEntity content) {
... | public Date getRemovalTime() {
return removalTime;
}
public void setRemovalTime(Date removalTime) {
this.removalTime = removalTime;
}
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
@Override
public String toString()... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AttachmentEntity.java | 1 |
请完成以下Java代码 | public void cleanContainerTree(Integer ID) {
cleanContainerTree("" + ID);
}
/**
* Clean ContainerTreeCache for this WebProjectID
* @param ID for container to clean
*/
public void cleanContainerTree(String ID) {
runURLRequest("ContainerTree", ID);
}
/**
* Clean Container Element for this ID
* @para... | E2.printStackTrace();
}
} catch (IOException E) {
if (log!=null)
log.warn("Can't clean cache at:" + thisURL + " be carefull, your deployment server may use invalid or old cache data!");
}
}
}
/**
* Converts JNP URL to http URL for cache cleanup
* @param JNPURL String with JNP URL fro... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\cm\CacheHandler.java | 1 |
请完成以下Java代码 | public class ReflectiveOperationInvoker implements OperationInvoker {
private final Object target;
private final OperationMethod operationMethod;
private final ParameterValueMapper parameterValueMapper;
/**
* Creates a new {@code ReflectiveOperationInvoker} that will invoke the given
* {@code method} on the... | return context.getArguments().get(parameter.getName()) == null;
}
private @Nullable Object[] resolveArguments(InvocationContext context) {
return this.operationMethod.getParameters()
.stream()
.map((parameter) -> resolveArgument(parameter, context))
.toArray();
}
private @Nullable Object resolveArgumen... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\invoke\reflect\ReflectiveOperationInvoker.java | 1 |
请完成以下Java代码 | public class CookieRoutePredicateFactory extends AbstractRoutePredicateFactory<CookieRoutePredicateFactory.Config> {
/**
* Name key.
*/
public static final String NAME_KEY = "name";
/**
* Regexp key.
*/
public static final String REGEXP_KEY = "regexp";
public CookieRoutePredicateFactory() {
super(Conf... | @Override
public String toString() {
return String.format("Cookie: name=%s regexp=%s", config.name, config.regexp);
}
};
}
public static class Config {
@NotEmpty
private @Nullable String name;
@NotEmpty
private @Nullable String regexp;
public @Nullable String getName() {
return name;
}
... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\CookieRoutePredicateFactory.java | 1 |
请完成以下Java代码 | public ShipperId getDefault(final ClientId clientId)
{
return queryBL
.createQueryBuilderOutOfTrx(I_M_Shipper.class)
.addInArrayFilter(I_M_Shipper.COLUMNNAME_AD_Client_ID, clientId, ClientId.SYSTEM)
.addEqualsFilter(I_M_Shipper.COLUMN_IsDefault, true)
.orderBy(I_M_Shipper.COLUMNNAME_AD_Client_ID)
... | public ImmutableMap<String, I_M_Shipper> getByInternalName(@NonNull final Set<String> internalNameSet)
{
if (Check.isEmpty(internalNameSet))
{
return ImmutableMap.of();
}
final List<I_M_Shipper> shipperList = queryBL.createQueryBuilder(I_M_Shipper.class)
.addOnlyActiveRecordsFilter()
.addInArrayFil... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\shipping\impl\ShipperDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Country2CountryAwareAttributeService implements ICountryAwareAttributeService
{
public static final Country2CountryAwareAttributeService instance = new Country2CountryAwareAttributeService();
private static final AdMessageKey MSG_NoCountryAttribute = AdMessageKey.of("de.metas.swat.CountryAttribute.error... | return attributeValue;
}
else
{
if (!attributeValue.isMatchingSOTrx(soTrx))
{
if (attributeAction == AttributeAction.Error)
{
throw new AttributeRestrictedException(ctx, soTrx, attributeValue, country.getCountryCode());
}
// We have an attribute value, but it is marked for a different ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\mm\attributes\countryattribute\impl\Country2CountryAwareAttributeService.java | 2 |
请完成以下Java代码 | public static boolean hasAllRoles(String roleNames) {
boolean hasAllRole = true;
Subject subject = getSubject();
if (subject != null && roleNames != null && roleNames.length() > 0) {
for (String role : roleNames.split(NAMES_DELIMETER)) {
if (!subject.hasRole(role.trim... | }
/**
* 认证通过或已记住的用户。与guset搭配使用。
*
* @return 用户:true,否则 false
*/
public static boolean isUser() {
return getSubject() != null && getSubject().getPrincipal() != null;
}
/**
* 验证当前用户是否为“访客”,即未认证(包含未记住)的用户。用user搭配使用
*
* @return 访客:true,否则false
*/
public ... | repos\SpringBootBucket-master\springboot-shiro\src\main\java\com\xncoding\pos\shiro\ShiroKit.java | 1 |
请完成以下Java代码 | public String getClientInfo()
{
// implementation basically copied from SwingClientUI
final String javaVersion = System.getProperty("java.version");
return new StringBuilder("!! NO UI REGISTERED YET !!, java.version=").append(javaVersion).toString();
}
@Override
public void showWindow(Object model)
... | }
@Override
public IClientUIAsyncInvoker invokeAsync()
{
throw new UnsupportedOperationException("not implemented");
}
@Override
public void showURL(String url)
{
System.err.println("Showing URL is not supported on server side: " + url);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\impl\ClientUI.java | 1 |
请完成以下Java代码 | public void afterPropertiesSet() throws Exception {
Assert.notNull(this.ticketValidator, "ticketValidator must be specified");
Assert.notNull(this.userDetailsService, "userDetailsService must be specified");
}
/**
* The <code>UserDetailsService</code> to use, for loading the user properties and the
* <code>G... | /**
* Allows subclasses to perform any additional checks of a returned
* <code>UserDetails</code> for a given authentication request.
* @param userDetails as retrieved from the {@link UserDetailsService}
* @param authentication validated {@link KerberosServiceRequestToken}
* @throws AuthenticationException Au... | repos\spring-security-main\kerberos\kerberos-core\src\main\java\org\springframework\security\kerberos\authentication\KerberosServiceAuthenticationProvider.java | 1 |
请完成以下Java代码 | public class LocatorGlobalQRCodeResolverKey
{
@NonNull String value;
private static final ConcurrentHashMap<String, LocatorGlobalQRCodeResolverKey> interner = new ConcurrentHashMap<>();
private LocatorGlobalQRCodeResolverKey(@NonNull final String value)
{
this.value = value;
}
@NonNull
public static Locator... | final String valueNorm = StringUtils.trimBlankToNull(value);
if (valueNorm == null)
{
return null;
}
return interner.computeIfAbsent(valueNorm, LocatorGlobalQRCodeResolverKey::new);
}
@Override
@Deprecated
public String toString() {return toJson();}
@JsonValue
public String toJson() {return value;}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\qrcode\resolver\LocatorGlobalQRCodeResolverKey.java | 1 |
请完成以下Java代码 | public class Company {
private Long id;
private String name;
@Relationship(type="owns")
private Car car;
public Company(String name) {
this.name = name;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Stri... | return name;
}
public void setName(String name) {
this.name = name;
}
public Car getCar() {
return car;
}
public void setCar(Car car) {
this.car = car;
}
} | repos\tutorials-master\persistence-modules\neo4j\src\main\java\com\baeldung\neo4j\domain\Company.java | 1 |
请完成以下Java代码 | public static ImmutableSet<HuId> extractHuIds(@NonNull final Collection<InventoryLineHU> lineHUs)
{
return extractHuIds(lineHUs.stream());
}
static ImmutableSet<HuId> extractHuIds(@NonNull final Stream<InventoryLineHU> lineHUs)
{
return lineHUs
.map(InventoryLineHU::getHuId)
.filter(Objects::nonNull)
... | //
@SuppressWarnings("unused")
public static class InventoryLineHUBuilder
{
InventoryLineHUBuilder updatingFrom(@NonNull final InventoryLineCountRequest request)
{
return huId(request.getHuId())
.huQRCode(HuId.equals(this.huId, request.getHuId()) ? this.huQRCode : null)
.qtyInternalUse(null)
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryLineHU.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BPartnerLocationAddressPart
{
@Nullable @With LocationId existingLocationId;
@Nullable String address1;
@Nullable String address2;
@Nullable String address3;
@Nullable String address4;
@Nullable String poBox;
@Nullable String postal;
@Nullable String city;
@Nullable String region;
@Nullable Strin... | public boolean isOnlyExistingLocationIdSet()
{
return existingLocationId != null
&& Check.isBlank(address1)
&& Check.isBlank(address2)
&& Check.isBlank(address3)
&& Check.isBlank(address4)
&& Check.isBlank(poBox)
&& Check.isBlank(postal)
&& Check.isBlank(city)
&& Check.isBlank(region)... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\BPartnerLocationAddressPart.java | 2 |
请完成以下Java代码 | public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) {
if (resolve(context, base, method)) {
throw new NullPointerException("Cannot invoke method " + method + " on null");
}
return null;
}
/**
* Get property value
... | }
/**
* Test property
*
* @param property
* property name
* @return <code>true</code> if the given property is associated with a value
*/
public boolean isProperty(String property) {
return map.containsKey(property);
}
/**
* Get properties
*
... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\util\RootPropertyResolver.java | 1 |
请完成以下Java代码 | public final T getById(@NonNull final DocumentId rowId) throws EntityNotFoundException
{
return rowsData.getById(rowId);
}
@Override
public <MT> List<MT> retrieveModelsByIds(final DocumentIdsSelection rowIds, final Class<MT> modelClass)
{
throw new UnsupportedOperationException();
}
/**
* Also supports {... | {
return; // nothing to do
}
final DocumentIdsSelection documentIdsToInvalidate = getDocumentIdsToInvalidate(recordRefsEligible);
if (documentIdsToInvalidate.isEmpty())
{
return; // nothing to do
}
rowsData.invalidate(documentIdsToInvalidate);
ViewChangesCollector.getCurrentOrAutoflush()
.coll... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\template\AbstractCustomView.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PortMapperConfigurer<H> portMapper(PortMapper portMapper) {
this.portMapper = portMapper;
return this;
}
/**
* Adds a port mapping
* @param httpPort the HTTP port that maps to a specific HTTPS port.
* @return {@link HttpPortMapping} to define the HTTPS port
*/
public HttpPortMapping http(int http... | private final int httpPort;
/**
* Creates a new instance
* @param httpPort
* @see PortMapperConfigurer#http(int)
*/
private HttpPortMapping(int httpPort) {
this.httpPort = httpPort;
}
/**
* Maps the given HTTP port to the provided HTTPS port and vice versa.
* @param httpsPort the HTTPS po... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\PortMapperConfigurer.java | 2 |
请完成以下Java代码 | public void setAD_User_ID (int AD_User_ID)
{
if (AD_User_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
}
/** Get User/Contact.
@return User within the system - Internal or Business Partner Contact
*/
public int g... | }
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Valid from.
@param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (Timestamp ValidFrom)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_JobAssignment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getImageURL() {
return imageURL;
}
public void setImageURL(String imageURL) {
this.imageURL = imageURL;
}
public String getProductId() {
return pr... | }
public void setProductId(String productId) {
this.productId = productId;
}
@Override
public String toString() {
return "ProdImageEntity{" +
"id='" + id + '\'' +
", imageURL='" + imageURL + '\'' +
", productId='" + productId + '\'' +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\product\ProdImageEntity.java | 2 |
请完成以下Java代码 | public void setId(String id) {
this.id = id;
}
@CamundaQueryParam("name")
public void setName(String name) {
this.name = name;
}
@CamundaQueryParam("nameLike")
public void setNameLike(String nameLike) {
this.nameLike = nameLike;
}
@CamundaQueryParam("userMember")
public void setUserMemb... | protected TenantQuery createNewQuery(ProcessEngine engine) {
return engine.getIdentityService().createTenantQuery();
}
@Override
protected void applyFilters(TenantQuery query) {
if (id != null) {
query.tenantId(id);
}
if (name != null) {
query.tenantName(name);
}
if (nameLike ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\identity\TenantQueryDto.java | 1 |
请完成以下Java代码 | void addLineItem(JpaOrderLine orderLine) {
checkNotNull(orderLine);
orderLines.add(orderLine);
}
String getCurrencyUnit() {
return currencyUnit;
}
Long getId() {
return id;
}
List<JpaOrderLine> getOrderLines() {
return new ArrayList<>(orderLines);
}... | void removeLineItem(int line) {
orderLines.remove(line);
}
void setCurrencyUnit(String currencyUnit) {
this.currencyUnit = currencyUnit;
}
void setTotalCost(BigDecimal totalCost) {
this.totalCost = totalCost;
}
private static void checkNotNull(Object par) {
if ... | repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\ddd\order\jpa\JpaOrder.java | 1 |
请完成以下Java代码 | private boolean isLeaf(int index) {
return !isValidIndex(leftChildIndex(index));
}
private boolean isCorrectParent(int index) {
return isCorrect(index, leftChildIndex(index)) && isCorrect(index, rightChildIndex(index));
}
private boolean isCorrectChild(int index) {
return isCor... | }
private int parentIndex(int index) {
return (index - 1) / 2;
}
private int leftChildIndex(int index) {
return 2 * index + 1;
}
private int rightChildIndex(int index) {
return 2 * index + 2;
}
} | repos\tutorials-master\algorithms-modules\algorithms-sorting-2\src\main\java\com\baeldung\algorithms\heapsort\Heap.java | 1 |
请完成以下Java代码 | public WeightingSpecifications getById(@NonNull final WeightingSpecificationsId id)
{
return getMap().getById(id);
}
public WeightingSpecificationsId getDefaultId()
{
return getMap().getDefaultId();
}
public WeightingSpecifications getDefault()
{
return getMap().getDefault();
}
public WeightingSpecifi... | .stream()
.map(WeightingSpecificationsRepository::fromRecord)
.collect(ImmutableList.toImmutableList());
return new WeightingSpecificationsMap(list);
}
public static WeightingSpecifications fromRecord(I_PP_Weighting_Spec record)
{
return WeightingSpecifications.builder()
.id(WeightingSpecifications... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\order\weighting\spec\WeightingSpecificationsRepository.java | 1 |
请完成以下Java代码 | public class MLandedCostAllocation extends X_C_LandedCostAllocation
{
/**
*
*/
private static final long serialVersionUID = -8645283018475474574L;
/**
* Get Cost Allocations for invoice Line
* @param ctx context
* @param C_InvoiceLine_ID invoice line
* @param trxName trx
* @return landed cost allo... | * Standard Constructor
* @param ctx context
* @param C_LandedCostAllocation_ID id
* @param trxName trx
*/
public MLandedCostAllocation (Properties ctx, int C_LandedCostAllocation_ID, String trxName)
{
super (ctx, C_LandedCostAllocation_ID, trxName);
if (C_LandedCostAllocation_ID == 0)
{
// setM_CostE... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MLandedCostAllocation.java | 1 |
请完成以下Java代码 | public static class ServiceTaskExport extends AbstractServiceTaskExport<ServiceTask> {
@Override
protected Class<? extends ServiceTask> getExportablePlanItemDefinitionClass() {
return ServiceTask.class;
}
}
public static class HttpServiceTaskExport extends AbstractServiceTas... | public static class FormAwareServiceTaskExport extends AbstractServiceTaskExport<FormAwareServiceTask> {
@Override
protected Class<? extends FormAwareServiceTask> getExportablePlanItemDefinitionClass() {
return FormAwareServiceTask.class;
}
@Override
public void wri... | repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\export\AbstractServiceTaskExport.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getExecutionId() {
return executionId;
}
public void setExecutionId(String executionId) {
this.executionId = executionId;
}
public Boolean getFinished() {
return finished;
}
public void setFinished(Boolean finished) {
this.finished = finished;
... | public void setTenantIdLike(String tenantIdLike) {
this.tenantIdLike = tenantIdLike;
}
public Boolean getWithoutTenantId() {
return withoutTenantId;
}
public void setWithoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = withoutTenantId;
}
public Set<String>... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricActivityInstanceQueryRequest.java | 2 |
请完成以下Java代码 | public static IHUQueryBuilder toHUQueryBuilderPart(final HUEditorRowFilter filter)
{
final IHUQueryBuilder huQueryBuilder = Services.get(IHandlingUnitsDAO.class).createHUQueryBuilder();
//
// Filter by row type
// IMPORTANT: don't filter out TUs/CUs because it might be that we are searching for included rows ... | // {
// throw new AdempiereException("String filter not supported: " + stringFilter);
// }
// Exclude M_HU_IDs
huQueryBuilder.addHUIdsToExclude(filter.getExcludeHUIds());
// Include HUStatuses
huQueryBuilder.addHUStatusesToInclude(filter.getOnlyHUStatuses());
// Exclude HUStatuses
huQueryBuilder.addH... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRowFilters.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setCurrentReplicationTrxStatus(@NonNull final EcosioOrdersRouteContext.TrxImportStatus currentTrxStatus)
{
importedTrxName2TrxStatus.put(currentReplicationTrxName, currentTrxStatus);
}
@NonNull
public Optional<NotifyReplicationTrxRequest> getStatusRequestFor(@NonNull final String trxName)
{
final ... | @Value
@Builder
public static class TrxImportStatus
{
boolean ok;
@Nullable
String errorMessage;
@NonNull
public static EcosioOrdersRouteContext.TrxImportStatus ok()
{
return TrxImportStatus.builder()
.ok(true)
.build();
}
@NonNull
public static EcosioOrdersRouteContext.TrxImportSta... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\ordersimport\ecosio\EcosioOrdersRouteContext.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public HUQRCodeGenerateRequestBuilder attribute(@NonNull AttributeId attributeId, @Nullable LocalDate valueDate)
{
return _attribute(Attribute.builder().attributeId(attributeId).valueDate(valueDate).build());
}
public HUQRCodeGenerateRequestBuilder attribute(@NonNull AttributeId attributeId, @Nullable Attribu... | //
//
@Value
@Builder
public static class Attribute
{
@Nullable AttributeId attributeId;
@Nullable AttributeCode code;
@Nullable String valueString;
@Nullable BigDecimal valueNumber;
@Nullable LocalDate valueDate;
@Nullable AttributeValueId valueListId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\service\HUQRCodeGenerateRequest.java | 2 |
请完成以下Java代码 | public boolean isAvailable()
{
return true;
}
@Override
public boolean isRunnable()
{
final VEditor editor = getEditor();
final GridField gridField = editor.getField();
if (gridField == null)
{
return false;
}
if (!Env.getUserRolePermissions().isShowPreference())
{
return false; | }
return true;
}
@Override
public void run()
{
final VEditor editor = getEditor();
final GridField gridField = editor.getField();
if (gridField == null)
{
return ;
}
ValuePreference.start (gridField, editor.getValue(), editor.getDisplay());
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\menu\ValuePreferenceContextEditorAction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static String getApplicationUri(HttpServletRequest request) {
UriComponents uriComponents = UriComponentsBuilder.fromUriString(UrlUtils.buildFullRequestUrl(request))
.replacePath(request.getContextPath())
.replaceQuery(null)
.fragment(null)
.build();
return uriComponents.toUriString();
}
/**
... | private UriResolver(Map<String, String> uriVariables) {
this.uriVariables = uriVariables;
}
public String resolve(String uri) {
if (uri == null) {
return null;
}
return UriComponentsBuilder.fromUriString(uri).buildAndExpand(this.uriVariables).toUriString();
}
}
} | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\web\RelyingPartyRegistrationPlaceholderResolvers.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<I_C_BPartner_Location_QuickInput> retrieveLocationsByQuickInputId(final BPartnerQuickInputId bpartnerQuickInputId)
{
return queryBL
.createQueryBuilder(I_C_BPartner_Location_QuickInput.class)
.addEqualsFilter(I_C_BPartner_Location_QuickInput.COLUMNNAME_C_BPartner_QuickInput_ID, bpartnerQuickInput... | }
public List<String> getOtherLocationNames(
final int bpartnerQuickInputRecordId,
final int bpartnerLocationQuickInputIdToExclude)
{
return queryBL
.createQueryBuilder(I_C_BPartner_Location_QuickInput.class)
.addEqualsFilter(I_C_BPartner_Location_QuickInput.COLUMNNAME_C_BPartner_QuickInput_ID, bpart... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\quick_input\service\BPartnerQuickInputRepository.java | 2 |
请完成以下Java代码 | protected boolean isEndpointTypeExposed(Class<?> beanType) {
return MergedAnnotations.from(beanType, SearchStrategy.SUPERCLASS).isPresent(ServletEndpoint.class);
}
@Override
protected ExposableServletEndpoint createEndpoint(Object endpointBean, EndpointId id, Access defaultAccess,
Collection<Operation> operati... | }
@Override
protected boolean isInvocable(ExposableServletEndpoint endpoint) {
return true;
}
static class ServletEndpointDiscovererRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
hints.reflection().registerType... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\annotation\ServletEndpointDiscoverer.java | 1 |
请完成以下Java代码 | public class SslHealthIndicator extends AbstractHealthIndicator {
private final SslInfo sslInfo;
private final Duration expiryThreshold;
public SslHealthIndicator(SslInfo sslInfo, Duration expiryThreshold) {
super("SSL health check failed");
Assert.notNull(sslInfo, "'sslInfo' must not be null");
this.sslInf... | private boolean containsInvalidCertificate(CertificateChainInfo certificateChain) {
return validatableCertificates(certificateChain).anyMatch(this::isNotValidCertificate);
}
private boolean containsExpiringCertificate(CertificateChainInfo certificateChain) {
return validatableCertificates(certificateChain).anyMa... | repos\spring-boot-4.0.1\module\spring-boot-health\src\main\java\org\springframework\boot\health\application\SslHealthIndicator.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_AD_User getSupervisor() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_Supervisor_ID, org.compiere.model.I_AD_User.class);
}
@Override
public void setSupervisor(org.compiere.model.I_AD_User Supervisor)
{
set_ValueFromPO(COLUMNNAME_Supervisor_ID, org.compiere.model.I_AD_U... | /** Donnerstag = 4 */
public static final String WEEKDAY_Donnerstag = "4";
/** Freitag = 5 */
public static final String WEEKDAY_Freitag = "5";
/** Samstag = 6 */
public static final String WEEKDAY_Samstag = "6";
/** Set Day of the Week.
@param WeekDay
Day of the Week
*/
@Override
public void setWeekDay... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Scheduler.java | 1 |
请完成以下Java代码 | public <T> T getModel(@NonNull final IContextAware context, @NonNull final Class<T> modelClass)
{
return InterfaceWrapperHelper.create(getModel(context), modelClass);
}
@NonNull
public <T> T getModelNonNull(@NonNull final IContextAware context, @NonNull final Class<T> modelClass)
{
final T model = InterfaceWr... | {
return getModel(PlainContextAware.newWithThreadInheritedTrx());
}
/**
* Deprecated: pls use appropriate DAO/Repository for loading models
* e.g. ModelDAO.getById({@link TableRecordReference#getIdAssumingTableName(String, IntFunction)})
*/
@Deprecated
@Override
public <T> T getModel(final Class<T> modelC... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\lang\impl\TableRecordReference.java | 1 |
请完成以下Java代码 | protected <DT> void exportEDI(
final Class<DT> documentType,
final String exportFormatName,
final String tableName,
final String columnName,
@Nullable final CreateAttachmentRequest attachResultRequest)
{
final String whereClause = columnName + "=?";
final Properties ctx = InterfaceWrapperHelper.get... | "*", // version
trxName);
}
if (expFormat == null)
{
throw new AdempiereException("@NotFound@ @EXP_Format_ID@ (@Value@: " + exportFormatName + ")");
}
return expFormat;
}
@Override
public T getDocument()
{
return document;
}
@Override
public final String getTableIdentifier()
{
return t... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\impl\AbstractExport.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setSocketTimeout(Duration socketTimeout) {
this.socketTimeout = socketTimeout;
}
public boolean isSocketKeepAlive() {
return this.socketKeepAlive;
}
public void setSocketKeepAlive(boolean socketKeepAlive) {
this.socketKeepAlive = socketKeepAlive;
}
public @Nullable String getPathPrefix() {
... | public Duration getDelayAfterFailure() {
return this.delayAfterFailure;
}
public void setDelayAfterFailure(Duration delayAfterFailure) {
this.delayAfterFailure = delayAfterFailure;
}
}
public static class Ssl {
/**
* SSL bundle name.
*/
private @Nullable String bundle;
public ... | repos\spring-boot-4.0.1\module\spring-boot-elasticsearch\src\main\java\org\springframework\boot\elasticsearch\autoconfigure\ElasticsearchProperties.java | 2 |
请完成以下Java代码 | public abstract class AbstractRequestParameterAllowFromStrategy implements AllowFromStrategy {
private static final String DEFAULT_ORIGIN_REQUEST_PARAMETER = "x-frames-allow-from";
private String allowFromParameterName = DEFAULT_ORIGIN_REQUEST_PARAMETER;
/** Logger for use by subclasses */
protected final Log lo... | * @param allowFromParameterName the name of the HTTP parameter to
*/
public void setAllowFromParameterName(String allowFromParameterName) {
Assert.notNull(allowFromParameterName, "allowFromParameterName cannot be null");
this.allowFromParameterName = allowFromParameterName;
}
/**
* Method to be implemented ... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\frameoptions\AbstractRequestParameterAllowFromStrategy.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setN... | @Override
public void setPP_Product_BOMVersions_ID (final int PP_Product_BOMVersions_ID)
{
if (PP_Product_BOMVersions_ID < 1)
set_ValueNoCheck (COLUMNNAME_PP_Product_BOMVersions_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PP_Product_BOMVersions_ID, PP_Product_BOMVersions_ID);
}
@Override
public int g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Product_BOMVersions.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PickFromHUsGetRequest
{
@NonNull ImmutableSet<LocatorId> pickFromLocatorIds;
@NonNull ProductId productId;
@NonNull BPartnerId partnerId;
@NonNull AttributeSetInstanceId asiId;
@NonNull ShipmentAllocationBestBeforePolicy bestBeforePolicy;
@NonNull Optional<HUReservationDocRef> reservationRef;
@Nulla... | final boolean ignoreHUsScheduledInDDOrderSchedules)
{
Check.assumeNotEmpty(pickFromLocatorIds, "pickFromLocatorIds shall not be empty");
this.pickFromLocatorIds = pickFromLocatorIds;
this.productId = productId;
this.partnerId = partnerId;
this.asiId = asiId;
this.bestBeforePolicy = bestBeforePolicy;
thi... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\plan\generator\pickFromHUs\PickFromHUsGetRequest.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class SemanticCachingService {
private final VectorStore vectorStore;
private final SemanticCacheProperties semanticCacheProperties;
SemanticCachingService(VectorStore vectorStore, SemanticCacheProperties semanticCacheProperties) {
this.vectorStore = vectorStore;
this.semanticCacheProperti... | .similarityThreshold(semanticCacheProperties.similarityThreshold())
.topK(1)
.build();
List<Document> results = vectorStore.similaritySearch(searchRequest);
if (results.isEmpty()) {
return Optional.empty();
}
Document result = results.getFirst();
... | repos\tutorials-master\spring-ai-modules\spring-ai-semantic-caching\src\main\java\com\baeldung\semantic\cache\SemanticCachingService.java | 2 |
请完成以下Java代码 | public void addValue (String functionColumnName, BigDecimal functionValue)
{
if (!isFunctionColumn(functionColumnName))
return;
// Group Breaks
for (int i = 0; i < m_groups.size(); i++)
{
String groupColumnName = (String)m_groups.get(i);
String key = groupColumnName + DELIMITER + functionColumnName;
... | if (i != 0)
sb.append(",");
sb.append(m_groups.get(i));
}
if (withData)
{
Iterator it = m_groupMap.keySet().iterator();
while(it.hasNext())
{
Object key = it.next();
Object value = m_groupMap.get(key);
sb.append(":").append(key).append("=").append(value);
}
}
sb.append(";Functio... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\PrintDataGroup.java | 1 |
请完成以下Java代码 | public boolean isList() {return LIST.equals(this);}
public interface CaseMapper<T>
{
T string();
T number();
T date();
T list();
}
public <T> T map(@NonNull final CaseMapper<T> mapper)
{
switch (this)
{
case STRING:
{
return mapper.string();
}
case NUMBER:
{
return mapper.nu... | void date();
void list();
}
public void apply(@NonNull final CaseConsumer consumer)
{
switch (this)
{
case STRING:
{
consumer.string();
break;
}
case NUMBER:
{
consumer.number();
break;
}
case DATE:
{
consumer.date();
break;
}
case LIST:
{
consumer... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\mm\attributes\AttributeValueType.java | 1 |
请完成以下Java代码 | public void remove(AttributeKey key) {
Map<String, AttributeKvEntry> map = getMapByScope(key.getScope());
if (map != null) {
map.remove(key.getAttributeKey());
}
}
public void update(String scope, List<AttributeKvEntry> values) {
Map<String, AttributeKvEntry> map = g... | } else if (scope.equalsIgnoreCase(DataConstants.SHARED_SCOPE)) {
map = serverPublicAttributesMap;
} else if (scope.equalsIgnoreCase(DataConstants.SERVER_SCOPE)) {
map = serverPrivateAttributesMap;
}
return map;
}
@Override
public String toString() {
r... | repos\thingsboard-master\common\message\src\main\java\org\thingsboard\server\common\msg\rule\engine\DeviceAttributes.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AvailableForSalesConfig
{
boolean featureEnabled;
ColorId insufficientQtyAvailableForSalesColorId;
int shipmentDateLookAheadHours;
int salesOrderLookBehindHours;
boolean runAsync;
int asyncTimeoutMillis;
boolean qtyPerWarehouse;
@Builder
private AvailableForSalesConfig(
@Nullable final C... | this.shipmentDateLookAheadHours = shipmentDateLookAheadHours;
this.salesOrderLookBehindHours = salesOrderLookBehindHours;
this.runAsync = runAsync;
this.qtyPerWarehouse = qtyPerWarehouse;
// we allow zero so people can check the async-error-handling
this.asyncTimeoutMillis = assumeGreaterOrEqualToZero(asyncT... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\AvailableForSalesConfig.java | 2 |
请完成以下Java代码 | public class ImportedValuesImpl extends ImportImpl implements ImportedValues {
protected static Attribute<String> expressionLanguageAttribute;
protected static ChildElement<ImportedElement> importedElementChild;
public ImportedValuesImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
... | });
expressionLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPRESSION_LANGUAGE)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
importedElementChild = sequenceBuilder.element(ImportedElement.class)
.required()
.build();
typeBuilder.build();
}
... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\ImportedValuesImpl.java | 1 |
请完成以下Java代码 | public Customer findUsingEnhancedForLoop(String name, List<Customer> customers) {
for (Customer customer : customers) {
if (customer.getName().equals(name)) {
return customer;
}
}
return null;
}
public Customer findUsingStream(String name, List<Cu... | }
}).orNull();
}
public Customer findUsingApacheCommon(String name, List<Customer> customers) {
return IterableUtils.find(customers, new org.apache.commons.collections4.Predicate<Customer>() {
public boolean evaluate(Customer customer) {
return customer.getName().equ... | repos\tutorials-master\core-java-modules\core-java-collections-list\src\main\java\com\baeldung\findanelement\FindACustomerInGivenList.java | 1 |
请完成以下Java代码 | Mono<String> useOauthWithAuthCode() {
Mono<String> retrievedResource = webClient.get()
.uri(RESOURCE_URI)
.retrieve()
.bodyToMono(String.class);
return retrievedResource.map(string -> "We retrieved the following resource using Oauth: " + string);
}
@GetMappin... | .uri(RESOURCE_URI)
.attributes(oauth2AuthorizedClient(authorizedClient))
.retrieve()
.bodyToMono(String.class);
return retrievedResource.map(string -> "We retrieved the following resource using Oauth: " + string + ". Principal associated: " + authorizedClient.getPrincipalName... | repos\tutorials-master\spring-reactive-modules\spring-reactive-oauth\src\main\java\com\baeldung\webclient\authorizationcodelogin\web\ClientRestController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public InsuranceContractQuantity unit(String unit) {
this.unit = unit;
return this;
}
/**
* Mengeneinheit (mögliche Werte 'Stk' oder 'Ktn')
* @return unit
**/
@Schema(example = "Stk", description = "Mengeneinheit (mögliche Werte 'Stk' oder 'Ktn')")
public String getUnit() {... | public int hashCode() {
return Objects.hash(pcn, quantity, unit, archived);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InsuranceContractQuantity {\n");
sb.append(" pcn: ").append(toIndentedString(pcn)).append("\n");
sb.append(" ... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractQuantity.java | 2 |
请完成以下Java代码 | public EsrAddressType getBank() {
return bank;
}
/**
* Sets the value of the bank property.
*
* @param value
* allowed object is
* {@link EsrAddressType }
*
*/
public void setBank(EsrAddressType value) {
this.bank = value;
}
/**
... | *
*/
public void setReferenceNumber(String value) {
this.referenceNumber = value;
}
/**
* Gets the value of the participantNumber property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getParticipantNumber() {
... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\Esr9Type.java | 1 |
请完成以下Java代码 | public void run(final String localTrxName) throws Exception
{
generate0();
}
});
}
private void generate0()
{
final OrdersCollector ordersCollector = OrdersCollector.newInstance();
final OrdersAggregator aggregator = OrdersAggregator.newInstance(ordersCollector);
for (final Iterator<I_PMM_Purchas... | public OrdersGenerator setCandidates(final Iterator<I_PMM_PurchaseCandidate> candidates)
{
Check.assumeNotNull(candidates, "candidates not null");
this.candidates = candidates;
return this;
}
public OrdersGenerator setCandidates(final Iterable<I_PMM_PurchaseCandidate> candidates)
{
Check.assumeNotNull(cand... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\OrdersGenerator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Optional<JsonRequestBPartnerUpsertItem> mapLocationToRequestItem(@NonNull final GetWarehouseFromFileRouteContext routeContext)
{
return mapLocationToJsonRequest(routeContext)
.map(jsonRequestComposite -> JsonRequestBPartnerUpsertItem.builder()
.bpartnerIdentifier(JsonMetasfreshId.toValueStr(routeCo... | location.setAddress1(StringUtils.trimBlankToNull(warehouseRow.getAddress1()));
location.setPostal(StringUtils.trimBlankToNull(warehouseRow.getPostal()));
location.setCity(StringUtils.trimBlankToNull(warehouseRow.getCity()));
location.setGln(StringUtils.trimBlankToNull(warehouseRow.getGln()));
location.setCountr... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-pcm-file-import\src\main\java\de\metas\camel\externalsystems\pcm\warehouse\processor\CreateBPartnerUpsertRequestProcessor.java | 2 |
请完成以下Java代码 | public int getId(final Object model)
{
return POJOWrapper.getWrapper(model).getId();
}
@Override
public String getModelTableNameOrNull(final Object model)
{
return POJOWrapper.getWrapper(model).getTableName();
}
@Override
public boolean isNew(final Object model)
{
return POJOWrapper.isNew(model);
}
... | return POJOWrapper.isValueChanged(model, columnNames);
}
@Override
public boolean isNull(final Object model, final String columnName)
{
return POJOWrapper.isNull(model, columnName);
}
@Override
public <T> T getDynAttribute(final Object model, final String attributeName)
{
final T value = POJOWrapper.getD... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POJOInterfaceWrapperHelper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static BeanMetadataElement createDefaultAuthenticationRequestResolver(
BeanMetadataElement relyingPartyRegistrationRepository) {
BeanMetadataElement defaultRelyingPartyRegistrationResolver = BeanDefinitionBuilder
.rootBeanDefinition(DefaultRelyingPartyRegistrationResolver.class)
.addConstructorArgValue(relyi... | static BeanMetadataElement getAuthenticationConverter(Element element) {
String authenticationConverter = element.getAttribute(ATT_AUTHENTICATION_CONVERTER);
if (StringUtils.hasText(authenticationConverter)) {
return new RuntimeBeanReference(authenticationConverter);
}
return null;
}
static BeanDefinition... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\Saml2LoginBeanDefinitionParserUtils.java | 2 |
请完成以下Java代码 | public class GetRenderedTaskFormCmd implements Command<Object>, Serializable {
private static final long serialVersionUID = 1L;
protected String taskId;
protected String formEngineName;
public GetRenderedTaskFormCmd(String taskId, String formEngineName) {
this.taskId = taskId;
this.for... | throw new ActivitiException("Task form definition for '" + taskId + "' not found");
}
TaskFormHandler taskFormHandler = task.getTaskDefinition().getTaskFormHandler();
if (taskFormHandler == null) {
return null;
}
FormEngine formEngine = commandContext
... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\GetRenderedTaskFormCmd.java | 1 |
请完成以下Java代码 | private void validate(final I_PP_Product_BOMLine bomLine)
{
final BOMComponentType componentType = BOMComponentType.ofCode(bomLine.getComponentType());
//
// For Co/By Products, Qty should be always negative:
if (componentType.isCoProduct()
&& Services.get(IProductBOMBL.class).getQtyExcludingScrap(bomLine... | if (componentType.isVariant() && noAccordinglyVariantGroup(bl))
{
bl.setVariantGroup(bomLine.getVariantGroup());
bomDAO.save(bl);
}
}
}
}
private boolean noAccordinglyVariantGroup(final I_PP_Product_BOMLine bomLine)
{
final IProductBOMDAO bomDAO = Services.get(IProductBOMDAO.class);
final... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\validator\PP_Product_BOMLine.java | 1 |
请完成以下Java代码 | public Object getParameterDefaultValue(final IProcessDefaultParameter parameter)
{
final MaterialNeedsPlannerRow materialNeedsPlannerRow = MaterialNeedsPlannerRow.ofViewRow(getSingleSelectedRow());
if (PARAM_M_Product_ID.equals(parameter.getColumnName()))
{
return materialNeedsPlannerRow.getProductId();
}
... | else if (PARAM_Level_Max.equals(parameter.getColumnName()))
{
return materialNeedsPlannerRow.getLevelMax();
}
else
{
return DEFAULT_VALUE_NOTAVAILABLE;
}
}
@Override
protected void postProcess(final boolean success)
{
getView().invalidateSelection();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\replenish\process\WEBUI_M_Replenish_Add_Update_Demand.java | 1 |
请完成以下Java代码 | public Double getDblValue() {
return dataType == DataType.DOUBLE ? dblValue : null;
}
public void setDblValue(Double dblValue) {
this.dataType = DataType.DOUBLE;
this.dblValue = dblValue;
}
public Boolean getBoolValue() {
return dataType == DataType.BOOLEAN ? boolValue ... | }
static EntityKeyValue fromBool(boolean b) {
EntityKeyValue result = new EntityKeyValue();
result.setBoolValue(b);
return result;
}
static EntityKeyValue fromLong(long l) {
EntityKeyValue result = new EntityKeyValue();
result.setLngValue(l);
return result;
... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\profile\EntityKeyValue.java | 1 |
请完成以下Java代码 | public void packTo(@Nullable final PackToSpec packToSpec)
{
assertDraft();
if (!pickStatus.isEligibleForPacking())
{
throw new AdempiereException("Invalid status when changing packing instructions: " + pickStatus);
}
this.packToSpec = packToSpec;
pickStatus = computePickOrPackStatus(this.packToSpec);
... | else
{
return PickingCandidateApprovalStatus.REJECTED;
}
}
private static PickingCandidatePickStatus computePickOrPackStatus(@Nullable final PackToSpec packToSpec)
{
return packToSpec != null ? PickingCandidatePickStatus.PACKED : PickingCandidatePickStatus.PICKED;
}
public boolean isPickFromPickingOrder... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\PickingCandidate.java | 1 |
请完成以下Java代码 | public Map<String, VariableInstanceEntity> getVariableInstanceEntities() {
ensureVariableInstancesInitialized();
return variableInstances;
}
public int getSuspensionState() {
return suspensionState;
}
public void setSuspensionState(int suspensionState) {
this.suspension... | queryVariables = new VariableInitializingList();
}
return queryVariables;
}
public void setQueryVariables(List<VariableInstanceEntity> queryVariables) {
this.queryVariables = queryVariables;
}
public Date getClaimTime() {
return claimTime;
}
public void setClai... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TaskEntityImpl.java | 1 |
请完成以下Java代码 | public class PersonIdentificationSEPA2 {
@XmlElement(name = "Othr", required = true)
protected RestrictedPersonIdentificationSEPA othr;
/**
* Gets the value of the othr property.
*
* @return
* possible object is
* {@link RestrictedPersonIdentificationSEPA }
*
... | }
/**
* Sets the value of the othr property.
*
* @param value
* allowed object is
* {@link RestrictedPersonIdentificationSEPA }
*
*/
public void setOthr(RestrictedPersonIdentificationSEPA value) {
this.othr = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\PersonIdentificationSEPA2.java | 1 |
请完成以下Java代码 | public int getC_BP_DocLine_Sort_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_DocLine_Sort_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_C_DocLine_Sort getC_DocLine_Sort() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_C_DocLine_Sort... | @Override
public void setC_DocLine_Sort_ID (int C_DocLine_Sort_ID)
{
if (C_DocLine_Sort_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_DocLine_Sort_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_DocLine_Sort_ID, Integer.valueOf(C_DocLine_Sort_ID));
}
/** Get Document Line Sorting Preferences.
@return Documen... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_DocLine_Sort.java | 1 |
请完成以下Java代码 | public class JsonRequestProductTaxCategoryUpsert
{
@ApiModelProperty
private String taxCategory;
@ApiModelProperty(hidden = true)
private boolean taxCategorySet;
@ApiModelProperty(required = true)
private String countryCode;
@ApiModelProperty
private Instant validFrom;
@ApiModelProperty(hidden = true)
pri... | this.taxCategorySet = true;
}
public void setValidFrom(final Instant validFrom)
{
this.validFrom = validFrom;
this.validFromSet = true;
}
public void setCountryCode(final String countryCode)
{
this.countryCode = countryCode;
}
public void setActive(final Boolean active)
{
this.active = active;
thi... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestProductTaxCategoryUpsert.java | 1 |
请完成以下Java代码 | public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof JsonDataEntry)) return false;
if (!super.equals(o)) return false;
JsonDataEntry that = (JsonDataEntry) o;
return Objects.equals(value, that.value);
}
@Override
public Object getValue() {... | return Objects.hash(super.hashCode(), value);
}
@Override
public String toString() {
return "JsonDataEntry{" +
"value=" + value +
"} " + super.toString();
}
@Override
public String getValueAsString() {
return value;
}
} | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\kv\JsonDataEntry.java | 1 |
请完成以下Java代码 | private List<Object> formatRow(final List<Object> row)
{
final List<DATEVExportFormatColumn> formatColumns = exportFormat.getColumns();
final int rowSize = row.size();
final List<Object> rowFormatted = new ArrayList<>(rowSize);
for (int i = 0; i < rowSize; i++)
{
final Object cell = row.get(i);
final D... | }
else if (value instanceof TemporalAccessor)
{
TemporalAccessor temporal = (TemporalAccessor)value;
return dateFormatter.format(temporal);
}
else
{
throw new AdempiereException("Cannot convert/format value to Date: " + value + " (" + value.getClass() + ")");
}
}
private static String formatNumb... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\DATEVCsvExporter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CustomWebSecurityConfigurerAdapter {
@Autowired private RestAuthenticationEntryPoint authenticationEntryPoint;
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth
.inMemoryAuthentication()
.withUser("user1")
.... | .permitAll()
.anyRequest()
.authenticated()
.and()
.httpBasic()
.authenticationEntryPoint(authenticationEntryPoint);
http.addFilterAfter(new CustomFilter(), BasicAuthenticationFilter.class);
return http.build();
}
@Bean
public Password... | repos\tutorials-master\apache-httpclient4\src\main\java\com\baeldung\filter\CustomWebSecurityConfigurerAdapter.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RoleResourceRepository implements ResourceRepositoryV2<Role, Long> {
@Autowired private RoleRepository roleRepository;
@Override
public Role findOne(Long id, QuerySpec querySpec) {
Optional<Role> role = roleRepository.findById(id);
return role.isPresent()? role.get() : null;
... | @Override
public <S extends Role> S save(S entity) {
return roleRepository.save(entity);
}
@Override
public void delete(Long id) {
roleRepository.deleteById(id);
}
@Override
public Class<Role> getResourceClass() {
return Role.class;
}
@Override
public <... | repos\tutorials-master\spring-katharsis\src\main\java\com\baeldung\persistence\katharsis\RoleResourceRepository.java | 2 |
请完成以下Java代码 | private Date convertFromString(String valueStr, @NonNull final ExpressionContext options)
{
if (valueStr == null)
{
return null;
}
valueStr = valueStr.trim();
//
// Use the given date format
try
{
final DateFormat dateFormat = (DateFormat)options.get(DateStringExpression.PARAM_DateFo... | super(context, compiler, expressionStr, constantValue);
}
}
private static final class SingleParameterExpression extends SingleParameterExpressionTemplate<Date, DateStringExpression> implements DateStringExpression
{
public SingleParameterExpression(final ExpressionContext context, final Compiler<Date, DateStr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\DateStringExpressionSupport.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.