instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getRemoteIpHeader() {
return this.remoteIpHeader;
}
public void setRemoteIpHeader(@Nullable String remoteIpHeader) {
this.remoteIpHeader = remoteIpHeader;
}
public @Nullable String getTrustedProxies() {
return this.trustedProxies;
}
public void setTrustedProxies(@Nullable... | * Always use APR and fail if it's not available.
*/
ALWAYS,
/**
* Use APR if it is available.
*/
WHEN_AVAILABLE,
/**
* Never use APR.
*/
NEVER
}
} | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\autoconfigure\TomcatServerProperties.java | 2 |
请完成以下Java代码 | protected String determineTargetUrl(final Authentication authentication) {
Map<String, String> roleTargetUrlMap = new HashMap<>();
roleTargetUrlMap.put("ROLE_USER", "/homepage.html");
roleTargetUrlMap.put("ROLE_ADMIN", "/console.html");
final Collection<? extends GrantedAuthority> auth... | /**
* Removes temporary authentication-related data which may have been stored in the session
* during the authentication process.
*/
protected final void clearAuthenticationAttributes(final HttpServletRequest request) {
final HttpSession session = request.getSession(false);
if (sess... | repos\tutorials-master\spring-security-modules\spring-security-web-mvc-custom\src\main\java\com\baeldung\security\MySimpleUrlAuthenticationSuccessHandler.java | 1 |
请完成以下Java代码 | private static String resolvePlaceholder(Properties properties, String text, String placeholderName) {
String propertyValue = getProperty(placeholderName, null, text);
if (propertyValue != null) {
return propertyValue;
}
return (properties != null) ? properties.getProperty(placeholderName) : null;
}
stati... | }
else {
return index;
}
}
else if (substringMatch(buf, index, SIMPLE_PREFIX)) {
withinNestedPlaceholder++;
index = index + SIMPLE_PREFIX.length();
}
else {
index++;
}
}
return -1;
}
private static boolean substringMatch(CharSequence str, int index, CharSequence substring)... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\launch\SystemPropertyUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected boolean hasExpired(long lastRecordedTime) {
return (getCurrentTimeMillis() - sessionInactivityTimeout) > lastRecordedTime;
}
@Override
protected void onStateExpiry(UUID sessionId, TransportProtos.SessionInfoProto sessionInfo) {
log.debug("Session with id: [{}] has expired due to l... | TransportProtos.SessionInfoProto sessionInfo = session != null ? session.getSessionInfo() : currentSessionInfo;
process(sessionInfo, subscriptionInfo, new TransportServiceCallback<>() {
@Override
public void onSuccess(Void msgAcknowledged) {
callback.onSuccess(sessionId, ... | repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\service\TransportActivityManager.java | 2 |
请完成以下Java代码 | public class Order extends RepresentationModel<Order> {
private String orderId;
private double price;
private int quantity;
public Order() {
super();
}
public Order(final String orderId, final double price, final int quantity) {
super();
this.orderId = orderId;
... | }
public void setPrice(final double price) {
this.price = price;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(final int quantity) {
this.quantity = quantity;
}
@Override
public String toString() {
return "Order [orderId=" + o... | repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\persistence\model\Order.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static final class PropertiesCouchbaseConnectionDetails implements CouchbaseConnectionDetails {
private final CouchbaseProperties properties;
private final @Nullable SslBundles sslBundles;
PropertiesCouchbaseConnectionDetails(CouchbaseProperties properties, @Nullable SslBundles sslBundles) {
this.properties... | @Override
public @Nullable String getPassword() {
return this.properties.getPassword();
}
@Override
public @Nullable SslBundle getSslBundle() {
Ssl ssl = this.properties.getEnv().getSsl();
if (!ssl.getEnabled()) {
return null;
}
if (StringUtils.hasLength(ssl.getBundle())) {
Assert.notNul... | repos\spring-boot-4.0.1\module\spring-boot-couchbase\src\main\java\org\springframework\boot\couchbase\autoconfigure\CouchbaseAutoConfiguration.java | 2 |
请完成以下Java代码 | public EdgeNodeDescriptor getEdgeNodeDescriptor() {
return edgeNodeDescriptor;
}
/**
* Returns the ID of the logical grouping of Edge of Network (EoN) Nodes and devices.
*
* @return the group ID
*/
public String getGroupId() {
return groupId;
}
/**
* Return... | if (getDeviceId() != null) {
sb.append("/").append(getDeviceId());
}
} else {
sb.append(getNamespace()).append("/").append(getType()).append("/").append(hostApplicationId);
}
return sb.toString();
}
/**
* @param type the type to check
* ... | repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\util\sparkplug\SparkplugTopic.java | 1 |
请完成以下Java代码 | public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Beschreibung.
@return Beschreibung */
@Override
public java.lang.String getDescription ()
{
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
/** Set Kommentar/Hilfe.
@... | @Override
public void setParent_Activity_ID (int Parent_Activity_ID)
{
if (Parent_Activity_ID < 1)
set_Value (COLUMNNAME_Parent_Activity_ID, null);
else
set_Value (COLUMNNAME_Parent_Activity_ID, Integer.valueOf(Parent_Activity_ID));
}
/** Get Hauptkostenstelle.
@return Hauptkostenstelle */
@Overri... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Activity.java | 1 |
请完成以下Java代码 | public String getClientId() {
return this.clientId;
}
/**
* Return the source topic.
* @return the source.
*/
public String getSource() {
return this.record.topic();
}
/**
* Return the consumer record.
* @return the record.
* @since 3.0.6
*/
public ConsumerRecord<?, ?> getRecord() {
return t... | * @return the partition.
* @since 3.2
*/
public String getPartition() {
return Integer.toString(this.record.partition());
}
/**
* Return the offset.
* @return the offset.
* @since 3.2
*/
public String getOffset() {
return Long.toString(this.record.offset());
}
} | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\micrometer\KafkaRecordReceiverContext.java | 1 |
请完成以下Java代码 | public String getCountryname() {
return countryname;
}
/**
* 设置名称
*
* @param countryname 名称
*/
public void setCountryname(String countryname) {
this.countryname = countryname;
}
/**
* 获取代码
*
* @return countrycode - 代码 | */
public String getCountrycode() {
return countrycode;
}
/**
* 设置代码
*
* @param countrycode 代码
*/
public void setCountrycode(String countrycode) {
this.countrycode = countrycode;
}
} | repos\MyBatis-Spring-Boot-master\src\main\java\tk\mybatis\springboot\model\Country.java | 1 |
请完成以下Java代码 | public class FlowNodeHistoryParseHandler implements BpmnParseHandler {
protected static final ActivityInstanceEndHandler ACTIVITI_INSTANCE_END_LISTENER = new ActivityInstanceEndHandler();
protected static final ActivityInstanceStartHandler ACTIVITY_INSTANCE_START_LISTENER = new ActivityInstanceStartHandler();... | @Override
public Set<Class<? extends BaseElement>> getHandledTypes() {
return supportedElementClasses;
}
@Override
public void parse(BpmnParse bpmnParse, BaseElement element) {
ActivityImpl activity = bpmnParse.getCurrentScope().findActivity(element.getId());
if (element instanc... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\history\parse\FlowNodeHistoryParseHandler.java | 1 |
请完成以下Java代码 | protected void logProcessDefinitionRegistrations(StringBuilder builder, List<ProcessDefinition> processDefinitions) {
if(processDefinitions.isEmpty()) {
builder.append("Deployment does not provide any process definitions.");
} else {
builder.append("Will execute process definitions ");
builde... | }
builder.append("\n");
}
}
public String getRegistrationSummary() {
StringBuilder builder = new StringBuilder();
for (Entry<String, DefaultProcessApplicationRegistration> entry : registrationsByDeploymentId.entrySet()) {
if(builder.length()>0) {
builder.append(", ");
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\application\ProcessApplicationManager.java | 1 |
请完成以下Java代码 | class PickedHUEditorRow
{
@NonNull
public static PickedHUEditorRow ofProcessedRow(@NonNull final HUEditorRow huEditorRow)
{
return new PickedHUEditorRow(huEditorRow, true, ImmutableMap.of());
}
@NonNull
public static PickedHUEditorRow ofUnprocessedRow(
@NonNull final HUEditorRow huEditorRow,
@NonNull fin... | @NonNull
public HuId getHUId()
{
return huEditorRow.getHuId();
}
@NonNull
public ImmutableMap<HuId, ImmutableSet<OrderId>> getPickingOrderIdsFor(@NonNull final ImmutableSet<HuId> huIds)
{
return huIds.stream()
.collect(ImmutableMap.toImmutableMap(Function.identity(),
huId -> Optional.ofNull... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickedHUEditorRow.java | 1 |
请完成以下Java代码 | public class SimpleCustomKeyValue<K, V> implements Map.Entry<K, V> {
private final K key;
private V value;
public SimpleCustomKeyValue(K key, V value) {
this.key = key;
this.value = value;
}
@Override
public K getKey() {
return key;
}
@Override
public V ge... | return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SimpleCustomKeyValue<?, ?> that = (SimpleCustomKeyValue<?, ?>) o;
return Objects.equals(key, that.key) && Objects.equals(value, that.value);
}
@Override
public int hashCode() {
... | repos\tutorials-master\core-java-modules\core-java-collections-maps-4\src\main\java\com\baeldung\entries\SimpleCustomKeyValue.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SetupDataLoader implements ApplicationListener<ContextRefreshedEvent> {
private boolean alreadySetup = false;
@Autowired
private UserRepository userRepository;
@Autowired
private RoleRepository roleRepository;
@Autowired
private PrivilegeRepository privilegeRepository;
... | basicUser.setEnabled(true);
userRepository.save(basicUser);
alreadySetup = true;
}
@Transactional
public Privilege createPrivilegeIfNotFound(String name) {
Privilege privilege = privilegeRepository.findByName(name);
if (privilege == null) {
privilege = new Privi... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\persistence\SetupDataLoader.java | 2 |
请完成以下Spring Boot application配置 | server:
port: 8080
servlet:
context-path: /demo
xxl:
job:
# 执行器通讯TOKEN [选填]:非空时启用;
access-token:
admin:
# 调度中心部署跟地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册;
address: http://localhost:18080/xxl-job-admin
executor:
# 执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭... | 时,注意要配置不同执行器端口;
port: 9999
# 执行器运行日志文件存储磁盘路径 [选填] :需要对该路径拥有读写权限;为空则使用默认路径;
log-path: logs/spring-boot-demo-task-xxl-job/task-log
# 执行器日志保存天数 [选填] :值大于3时生效,启用执行器Log文件定期清理功能,否则不生效;
log-retention-days: -1 | repos\spring-boot-demo-master\demo-task-xxl-job\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public void run(String... args) throws Exception {
User luke = new User("id-1", "luke");
luke.setFirstname("Luke");
luke.setLastname("Skywalker");
luke.setPosts(List.of(new Post("I have a bad feeling about this.")));
User leia = new User("id-2", "leia");
leia.setFirstna... | repository.usersWithUsernamesStartingWith("l");
repository.findUserByUsername("yoda");
repository.findUserByPostsMessageLike("father");
repository.findOptionalUserByUsername("yoda");
Long count = repository.countUsersByLastnameLike("Sky");
Boolean exists = repository.existsByUsername("v... | repos\spring-data-examples-main\mongodb\aot-optimization\src\main\java\example\springdata\aot\CLR.java | 1 |
请完成以下Java代码 | private BPartnerQuery buildBPartnerQuery(@NonNull final IdentifierString bpartnerIdentifier)
{
final IdentifierString.Type type = bpartnerIdentifier.getType();
final BPartnerQuery query;
switch (type)
{
case METASFRESH_ID:
query = BPartnerQuery.builder()
.bPartnerId(bpartnerIdentifier.asMetasfres... | }
@VisibleForTesting
public String buildDocumentNo(@NonNull final DocTypeId docTypeId)
{
final IDocumentNoBuilderFactory documentNoFactory = Services.get(IDocumentNoBuilderFactory.class);
final String documentNo = documentNoFactory.forDocType(docTypeId.getRepoId(), /* useDefiniteSequence */false)
.setClien... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\remittanceadvice\impl\CreateRemittanceAdviceService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WEBUI_M_HU_ReturnFromCustomer_Pharma extends WEBUI_M_HU_ReturnFromCustomer
{
@Autowired
private SecurPharmService securPharmService;
@Param(mandatory = true, parameterName = WEBUI_M_HU_SecurPharmScan.PARAM_Barcode)
private String dataMatrixCode;
@Override
protected ProcessPreconditionsResolution ch... | return ProcessPreconditionsResolution.rejectWithInternalReason("No securpharm config");
}
return ProcessPreconditionsResolution.accept();
}
@Override
protected String doIt()
{
final DataMatrixCode dataMatrix = getDataMatrix();
final SecurPharmHUAttributesScanner scanner = securPharmService.newHUScanner();... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_ReturnFromCustomer_Pharma.java | 2 |
请完成以下Java代码 | public void postProcessApplicationDeploy(ProcessApplicationInterface processApplication) {
counter.incrementAndGet();
}
@SuppressWarnings("resource")
@Override
public void postProcessApplicationUndeploy(ProcessApplicationInterface processApplication) {
// some tests deploy multiple PAs. => only clean D... | if (!databasePurgeReport.isEmpty()) {
builder.append(DATABASE_NOT_CLEAN).append(databasePurgeReport.getPurgeReportAsString());
}
CachePurgeReport cachePurgeReport = report.getCachePurgeReport();
if (!cachePurgeReport.isEmpty()) {
builder.append(CACHE_IS_NOT_CLEAN).... | repos\camunda-bpm-platform-master\qa\ensure-clean-db-plugin\src\main\java\org\camunda\qa\impl\EnsureCleanDbPlugin.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getFinishOrderCount() {
return finishOrderCount;
}
public void setFinishOrderCount(Integer finishOrderCount) {
this.finishOrderCount = finishOrderCoun... | this.finishOrderAmount = finishOrderAmount;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.appen... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMemberTag.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JSONJavaException
{
String message;
boolean userFriendlyError;
@Nullable @JsonInclude(JsonInclude.Include.NON_EMPTY) String stackTrace;
@Nullable @JsonInclude(JsonInclude.Include.NON_EMPTY) Map<String, Object> attributes;
@Nullable @JsonInclude(JsonInclude.Include.NON_EMPTY) AdIssueId adIssueId;
@Nu... | {
if (exception instanceof AdempiereException)
{
final Map<String, Object> exceptionAttributes = ((AdempiereException)exception).getParameters();
if (exceptionAttributes == null || exceptionAttributes.isEmpty())
{
return null;
}
return exceptionAttributes.entrySet()
.stream()
.map(entr... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONJavaException.java | 2 |
请完成以下Java代码 | public class SynchronizedReceiver implements Runnable {
private static final Logger LOG = LoggerFactory.getLogger(SynchronizedReceiver.class);
private final Data data;
private String message;
private boolean illegalMonitorStateExceptionOccurred;
public SynchronizedReceiver(Data data) {
th... | LOG.error("thread was interrupted", e);
Thread.currentThread().interrupt();
} catch (IllegalMonitorStateException e) {
LOG.error("illegal monitor state exception occurred", e);
illegalMonitorStateExceptionOccurred = true;
}
}
}
pub... | repos\tutorials-master\core-java-modules\core-java-exceptions-3\src\main\java\com\baeldung\exceptions\illegalmonitorstate\SynchronizedReceiver.java | 1 |
请完成以下Java代码 | public void setPriorityRule (java.lang.String PriorityRule)
{
set_Value (COLUMNNAME_PriorityRule, PriorityRule);
}
/** Get Priorität.
@return Priority of a document
*/
@Override
public java.lang.String getPriorityRule ()
{
return (java.lang.String)get_Value(COLUMNNAME_PriorityRule);
}
/** Set Verar... | return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Summe Zeilen.
@param TotalLines
Total of all document lines
*/
@Override
public void setTotalLines (java.math.BigDecimal TotalLines)
{
set_Value (COLUMNNAME_TotalLines, TotalLines);
}
/** Get Summe Zeilen.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Requisition.java | 1 |
请完成以下Java代码 | public String getPrintName ()
{
return (String)get_Value(COLUMNNAME_PrintName);
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of... | }
/** Get X Position.
@return Absolute X (horizontal) position in 1/72 of an inch
*/
public int getXPosition ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_XPosition);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Y Position.
@param YPosition
Absolute Y (vertical) position in 1/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintLabelLine.java | 1 |
请完成以下Java代码 | public Optional<Map<String, Object>> getMessagePayload(DelegateExecution execution) {
return messagePayloadMappingProvider.getMessagePayload(execution);
}
@Override
public ThrowMessage createThrowMessage(DelegateExecution execution) {
String name = getMessageName(execution);
Optiona... | }
protected void assertNoExistingDuplicateEventSubscriptions(
String messageName,
String correlationKey,
CommandContext commandContext
) {
List<EventSubscriptionEntity> existing = commandContext
.getEventSubscriptionEntityManager()
.findEventSubscriptions... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\factory\DefaultMessageExecutionContext.java | 1 |
请完成以下Java代码 | public class M_InventoryLine_AssignSelectedLines extends JavaProcess
{
private static final String PARAM_NumberOfCounters = "NumberOfCounters";
private final IInventoryBL inventoryBL = Services.get(IInventoryBL.class);
@Param(parameterName = PARAM_NumberOfCounters, mandatory = true)
private BigDecimal numberOfCou... | private List<I_M_InventoryLine> getSelectedInventoryLines()
{
final IQueryFilter<I_M_InventoryLine> selectedInventoryLines = getProcessInfo().getQueryFilterOrElseFalse();
final IQueryBL queryBL = Services.get(IQueryBL.class);
final IQueryBuilder<I_M_InventoryLine> queryBuilder = queryBL.createQueryBuilder(I_M_I... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inventory\process\M_InventoryLine_AssignSelectedLines.java | 1 |
请完成以下Java代码 | public void updateHUTrxAttribute(@NonNull final MutableHUTransactionAttribute huTrxAttribute, @NonNull final IAttributeValue fromAttributeValue)
{
assertNotDisposed();
//
// Set M_HU
final I_M_HU hu = getM_HU();
huTrxAttribute.setReferencedObject(hu);
//
// Set HU related fields
//
// NOTE: we assu... | final I_M_HU hu = getM_HU();
final IHUStorageDAO huStorageDAO = getHUStorageDAO();
return huStorageDAO.getC_UOMTypeOrNull(hu);
}
@Override
public final BigDecimal getStorageQtyOrZERO()
{
final IHUStorageFactory huStorageFactory = getAttributeStorageFactory().getHUStorageFactory();
final IHUStorage storage ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AbstractHUAttributeStorage.java | 1 |
请完成以下Java代码 | public static Date getYesterdayEndTime() {
return DateUtil.endOfDay(getYesterdayStartTime());
}
/**
* 明天开始时间
*
* @return
*/
public static Date getTomorrowStartTime() {
return DateUtil.beginOfDay(DateUtil.tomorrow());
}
/**
* 明天结束时间
*
* @return
... | * 今天开始时间
*
* @return
*/
public static Date getTodayStartTime() {
return DateUtil.beginOfDay(new Date());
}
/**
* 今天结束时间
*
* @return
*/
public static Date getTodayEndTime() {
return DateUtil.endOfDay(new Date());
}
} | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\DateRangeUtils.java | 1 |
请完成以下Java代码 | public class ConversationAssociationImpl extends BaseElementImpl implements ConversationAssociation {
protected static AttributeReference<ConversationNode> innerConversationNodeRefAttribute;
protected static AttributeReference<ConversationNode> outerConversationNodeRefAttribute;
public static void registerType(... | return innerConversationNodeRefAttribute.getReferenceTargetElement(this);
}
public void setInnerConversationNode(ConversationNode innerConversationNode) {
innerConversationNodeRefAttribute.setReferenceTargetElement(this, innerConversationNode);
}
public ConversationNode getOuterConversationNode() {
re... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ConversationAssociationImpl.java | 1 |
请完成以下Java代码 | default org.compiere.model.I_AD_User getById(final int adUserRepoId)
{
return getById(UserId.ofRepoId(adUserRepoId));
}
org.compiere.model.I_AD_User getById(UserId adUserId);
<T extends org.compiere.model.I_AD_User> T getByIdInTrx(UserId userId, Class<T> modelClass);
default org.compiere.model.I_AD_User getBy... | @Nullable
UserId retrieveUserIdByEMail(@Nullable String email, ClientId adClientId);
/**
* @return all system(login) user IDs
*/
Set<UserId> retrieveSystemUserIds();
boolean isSystemUser(UserId userId);
@Nullable
BPartnerId getBPartnerIdByUserId(final UserId userId);
@Nullable
UserId retrieveUserIdByLog... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\api\IUserDAO.java | 1 |
请完成以下Java代码 | public List<I_PP_Order_Report> getCreatedReportLines()
{
return new ArrayList<>(_createdReportLines);
}
private IContextAware getContext()
{
return context;
}
private I_PP_Order getPP_Order()
{
// not null
return ppOrder;
}
/**
* Delete existing {@link I_PP_Order_Report}s lines linked to current m... | // Iterate lines and save one by one
for (final IQualityInspectionLine qiLine : qiLinesToSave)
{
save(qiLine);
}
}
/**
* Save given {@link IQualityInspectionLine} (i.e. creates {@link I_PP_Order_Report} line).
*
* @param qiLine
*/
private void save(final IQualityInspectionLine qiLine)
{
Check.as... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PPOrderReportWriter.java | 1 |
请完成以下Java代码 | public int getCarrier_ShipmentOrder_Parcel_ID()
{
return get_ValueAsInt(COLUMNNAME_Carrier_ShipmentOrder_Parcel_ID);
}
@Override
public void setHeightInCm (final int HeightInCm)
{
set_Value (COLUMNNAME_HeightInCm, HeightInCm);
}
@Override
public int getHeightInCm()
{
return get_ValueAsInt(COLUMNNAME_... | }
@Override
public byte[] getPdfLabelData()
{
return (byte[])get_Value(COLUMNNAME_PdfLabelData);
}
@Override
public void setTrackingURL (final @Nullable java.lang.String TrackingURL)
{
set_Value (COLUMNNAME_TrackingURL, TrackingURL);
}
@Override
public java.lang.String getTrackingURL()
{
return ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Parcel.java | 1 |
请完成以下Java代码 | public JsonCache getById(
@PathVariable("cacheId") final String cacheIdStr,
@RequestParam(name = "limit", required = false, defaultValue = "100") final int limit)
{
assertAuth();
final long cacheId = Long.parseLong(cacheIdStr);
final CacheInterface cacheInterface = cacheMgt.getById(cacheId)
.orElseThr... | @GetMapping("/remoteCacheInvalidationTableNames")
public Set<String> getRemoteCacheInvalidationTableNames()
{
return cacheMgt.getTableNamesToBroadcast()
.stream()
.sorted()
.collect(ImmutableSet.toImmutableSet());
}
@GetMapping("/remoteCacheInvalidationTableNames/add")
public void enableRemoteCacheI... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\rest\CacheRestControllerTemplate.java | 1 |
请完成以下Java代码 | protected void prepare()
{
// nothing
}
@Override
protected String doIt() throws Exception
{
final Iterator<I_C_ValidCombination> accounts = retriveAccounts();
int countAll = 0;
int countOK = 0;
while (accounts.hasNext())
{
final I_C_ValidCombination account = accounts.next();
final boolean upd... | }
/**
*
* @param account
* @return true if updated; false if got errors (which will be logged)
*/
private boolean updateValueDescription(I_C_ValidCombination account)
{
DB.saveConstraints();
try
{
DB.getConstraints().addAllowedTrxNamePrefix(ITrx.TRXNAME_PREFIX_LOCAL);
accountBL.setValueDesc... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\C_ValidCombination_UpdateDescriptionForAll.java | 1 |
请完成以下Java代码 | public void setCompiler(Compiler compiler) {
this.compiler = compiler;
}
/**
* Set the charset used for reading Mustache template files.
* @param charset the charset to use for reading template files
*/
public void setCharset(@Nullable String charset) {
this.charset = charset;
}
@Override
public boole... | }
return exchange.getResponse().writeWith(Flux.just(dataBuffer));
}
private @Nullable Resource resolveResource() {
ApplicationContext applicationContext = getApplicationContext();
String url = getUrl();
if (applicationContext == null || url == null) {
return null;
}
Resource resource = applicationCont... | repos\spring-boot-4.0.1\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\reactive\view\MustacheView.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class GreetingActor extends UntypedActor {
private GreetingService greetingService;
public GreetingActor(GreetingService greetingService) {
this.greetingService = greetingService;
}
@Override
public void onReceive(Object message) throws Throwable {
if (message instanceof Gr... | public static class Greet {
private String name;
public Greet(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
} | repos\tutorials-master\akka-modules\spring-akka\src\main\java\com\baeldung\akka\GreetingActor.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Users email(String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
**/
@Schema(example = "m.mueller@it-labs.de", descriptio... | @Override
public int hashCode() {
return Objects.hash(_id, firstName, lastName, email, timestamp);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Users {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
sb.append(... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\Users.java | 2 |
请完成以下Java代码 | public void addQuantitiesRecord(@NonNull final ProductWithDemandSupply quantitiesRecord)
{
final I_C_UOM uom = uomDAO.getById(quantitiesRecord.getUomId());
qtyDemandSalesOrder = addToNullable(qtyDemandSalesOrder, quantitiesRecord.getQtyReserved(), uom);
qtySupplyPurchaseOrder = addToNullable(qtySupplyPurchaseOr... | .productId(productIdAndDate.getProductId().getRepoId())
.detailsRowAggregationIdentifier(detailsRowAggregationIdentifier)
.qtyDemandSalesOrder(qtyDemandSalesOrder)
.qtySupplyPurchaseOrder(qtySupplyPurchaseOrder)
.qtyStockEstimateCountAtDate(qtyStockEstimateCountAtDate)
.qtyStockEstimateTimeAtDate(qt... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\rowfactory\CountingSubRowBucket.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8080
zuul:
prefix: /api
routes:
greeting-service:
path: /greeting/**
url: forward:/greeting
foos-service:
path: /fo | os/**
url: http://localhost:8081/spring-zuul-foos-resource/foos | repos\tutorials-master\spring-cloud-modules\spring-cloud-zuul\spring-zuul-post-filter\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public class BpmnProperties {
public static final PropertyKey<String> TYPE = new PropertyKey<String>("type");
public static final PropertyListKey<EscalationEventDefinition> ESCALATION_EVENT_DEFINITIONS = new PropertyListKey<>("escalationEventDefinitions");
public static final PropertyListKey<ErrorEventDefiniti... | */
public static final PropertyMapKey<String, EventSubscriptionDeclaration> EVENT_SUBSCRIPTION_DECLARATIONS = new PropertyMapKey<>("eventDefinitions", false);
public static final PropertyKey<ActivityImpl> COMPENSATION_BOUNDARY_EVENT = new PropertyKey<>("compensationBoundaryEvent");
public static final PropertyK... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\helper\BpmnProperties.java | 1 |
请完成以下Java代码 | public static final class Builder
{
private Integer C_BPartner_ID;
private Integer M_Product_ID;
private Integer M_AttributeSetInstance_ID;
private Integer M_HU_PI_Item_Product_ID;
private int C_Flatrate_DataEntry_ID = -1;
//
private Date date;
//
private BigDecimal qtyPromised = BigDecimal.ZERO;
p... | return this;
}
public Builder setC_Flatrate_DataEntry_ID(int C_Flatrate_DataEntry_ID)
{
this.C_Flatrate_DataEntry_ID = C_Flatrate_DataEntry_ID;
return this;
}
public Builder setDate(final Date date)
{
this.date = date;
return this;
}
public Builder setQtyPromised(final BigDecimal qtyPro... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\balance\PMMBalanceChangeEvent.java | 1 |
请完成以下Java代码 | public Double getPrice() {
return price;
}
public Book price(Double price) {
this.price = price;
return this;
}
public void setPrice(Double price) {
this.price = price;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here,... | return Objects.hashCode(getId());
}
@Override
public String toString() {
return "Book{" +
"id=" + getId() +
", title='" + getTitle() + "'" +
", author='" + getAuthor() + "'" +
", published='" + getPublished() + "'" +
", quantity=" + getQua... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\domain\Book.java | 1 |
请完成以下Java代码 | public class WorkflowService {
private final WorkflowClient workflowClient;
private final Environment environment;
public Map<String, Object> startFoodDeliveryWorkflow(FoodDeliveryRequest foodDeliveryRequest) {
StartWorkflowRequest request = new StartWorkflowRequest();
request.setName("Foo... | inputData.put("paymentMethod", foodDeliveryRequest.getPaymentMethod());
request.setInput(inputData);
String workflowId = "";
try {
workflowId = workflowClient.startWorkflow(request);
log.info("Workflow id: {}", workflowId);
} catch (Exception ex) {
ex... | repos\tutorials-master\microservices-modules\saga-pattern\src\main\java\io\orkes\example\saga\service\WorkflowService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isSuccess() {
return isSuccess;
}
public void setSuccess(boolean success) {
isSuccess = success;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public Strin... | }
public void setData(T data) {
this.data = data;
}
@Override
public String toString() {
return "Result{" +
"isSuccess=" + isSuccess +
", errorCode=" + errorCode +
", message='" + message + '\'' +
", data=" + data +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\rsp\Result.java | 2 |
请完成以下Java代码 | public class Customer {
@XStreamAlias("fn")
private String firstName;
private String lastName;
private Date dob;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastNa... | public void setLastName(String lastName) {
this.lastName = lastName;
}
public Date getDob() {
return dob;
}
public void setDob(Date dob) {
this.dob = dob;
}
@Override
public String toString() {
return "Customer [firstName=" + firstName + ", lastName=" + las... | repos\tutorials-master\xml-modules\xstream\src\main\java\com\baeldung\annotation\pojo\Customer.java | 1 |
请完成以下Java代码 | public User phone(String phone) {
this.phone = phone;
return this;
}
/**
* Get phone
* @return phone
**/
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public User userStatus(Integer userStat... | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firs... | repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\User.java | 1 |
请完成以下Java代码 | public final class GroupCreator
{
// services
private final GroupRepository groupsRepo;
private final GroupCompensationLineCreateRequestFactory compensationLineCreateRequestFactory;
private final GroupTemplate groupTemplate;
private final BigDecimal qty;
@Builder
private GroupCreator(
@NonNull final GroupR... | .newContractConditionsId(contractConditionsId)
.qtyMultiplier(qty)
.build());
recreateGroup(group);
return group;
}
public void recreateGroup(@NonNull final Group group)
{
group.removeAllGeneratedLines();
groupTemplate.getCompensationLines()
.stream()
.filter(compensationLineTemplate ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\GroupCreator.java | 1 |
请完成以下Java代码 | public AdempiereProcessorLog[] getLogs ()
{
ArrayList<MAlertProcessorLog> list = new ArrayList<>();
String sql = "SELECT * "
+ "FROM AD_AlertProcessorLog "
+ "WHERE AD_AlertProcessor_ID=? "
+ "ORDER BY Created DESC";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareS... | String sql = "SELECT * FROM AD_Alert "
+ "WHERE AD_AlertProcessor_ID=? AND IsActive='Y' ";
ArrayList<MAlert> list = new ArrayList<>();
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement (sql, null);
pstmt.setInt (1, getAD_AlertProcessor_ID());
rs = pstmt.execute... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAlertProcessor.java | 1 |
请完成以下Java代码 | private static BPartnerId getBPartnerId(final IAllocationRequest request)
{
final Object referencedModel = AllocationUtils.getReferencedModel(request);
if (referencedModel == null)
{
return null;
}
final Integer bpartnerId = InterfaceWrapperHelper.getValueOrNull(referencedModel, I_M_HU_PI_Item.COLUMNNAME... | */
public static IHUBuilder createHUBuilder(final IAllocationRequest request)
{
final IHUContext huContext = request.getHuContext();
final IHUBuilder huBuilder = Services.get(IHandlingUnitsDAO.class).createHUBuilder(huContext);
huBuilder.setDate(request.getDate());
huBuilder.setBPartnerId(getBPartnerId(requ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AllocationUtils.java | 1 |
请完成以下Java代码 | public FileValue readValue(ValueFields valueFields, boolean deserializeValue, boolean asTransientValue) {
String fileName = valueFields.getTextValue();
if (fileName == null) {
// ensure file name is not null
fileName = "";
}
FileValueBuilder builder = Variables.fileValue(fileName);
if (v... | protected String returnNullIfEmptyString(String s) {
if (s.isEmpty()) {
return null;
}
return s;
}
@Override
public String getName() {
return valueType.getName();
}
@Override
protected boolean canWriteValue(TypedValue value) {
if (value == null || value.getType() == null) {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\variable\serializer\FileValueSerializer.java | 1 |
请完成以下Java代码 | public HUWithExpiryDates getByIdIfWarnDateExceededOrNull(
@NonNull final HuId huId,
@Nullable final LocalDate expiryWarnDate)
{
final Timestamp timestamp = TimeUtil.asTimestamp(expiryWarnDate);
final I_M_HU_BestBefore_V recordOrdNull = queryBL.createQueryBuilder(I_M_HU_BestBefore_V.class)
.addCompareFil... | .addEqualsFilter(I_M_HU_BestBefore_V.COLUMN_M_HU_ID, huId)
.create()
.firstOnly(I_M_HU_BestBefore_V.class);
return ofRecordOrNull(recordOrdNull);
}
public Iterator<HuId> getAllWithBestBeforeDate()
{
return handlingUnitsDAO.createHUQueryBuilder()
.addOnlyWithAttributeNotNull(AttributeConstants.ATTR_... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\expiry\HUWithExpiryDatesRepository.java | 1 |
请完成以下Java代码 | public CaseFileItem getSource() {
return sourceRefAttribute.getReferenceTargetElement(this);
}
public void setSource(CaseFileItem source) {
sourceRefAttribute.setReferenceTargetElement(this, source);
}
public CaseFileItemTransition getStandardEvent() {
CaseFileItemTransitionStandardEvent child = s... | .instanceProvider(new ModelTypeInstanceProvider<CaseFileItemOnPart>() {
public CaseFileItemOnPart newInstance(ModelTypeInstanceContext instanceContext) {
return new CaseFileItemOnPartImpl(instanceContext);
}
});
sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseFileItemOnPartImpl.java | 1 |
请完成以下Java代码 | public class GatewayMetricsFilter implements GlobalFilter, Ordered {
private static final Log log = LogFactory.getLog(GatewayMetricsFilter.class);
private final MeterRegistry meterRegistry;
private GatewayTagsProvider compositeTagsProvider;
private final String metricsPrefix;
public GatewayMetricsFilter(Meter... | .doOnError(throwable -> endTimerRespectingCommit(exchange, sample));
}
private void endTimerRespectingCommit(ServerWebExchange exchange, Sample sample) {
ServerHttpResponse response = exchange.getResponse();
if (response.isCommitted()) {
endTimerInner(exchange, sample);
}
else {
response.beforeCommit(... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\GatewayMetricsFilter.java | 1 |
请完成以下Java代码 | public class ByteArrayFileStream extends ByteArrayStream
{
private FileChannel fileChannel;
public ByteArrayFileStream(byte[] bytes, int bufferSize, FileChannel fileChannel)
{
super(bytes, bufferSize);
this.fileChannel = fileChannel;
}
public static ByteArrayFileStream createByteAr... | try
{
int availableBytes = (int) (fileChannel.size() - fileChannel.position());
ByteBuffer byteBuffer = ByteBuffer.allocate(Math.min(availableBytes, offset));
int readBytes = fileChannel.read(byteBuffer);
if (readBytes == availableBytes)
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\io\ByteArrayFileStream.java | 1 |
请完成以下Java代码 | public int getAD_Table_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Table_ID);
}
@Override
public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_Value (COLUMNNAME_AD_User_ID, null);
else
set_Value (COLUMNNAME_AD_User_ID, AD_User_ID);
}
@Override
public int getAD_User_ID()
{... | @Override
public int getRoot_AD_Table_ID()
{
return get_ValueAsInt(COLUMNNAME_Root_AD_Table_ID);
}
@Override
public void setRoot_Record_ID (final int Root_Record_ID)
{
if (Root_Record_ID < 1)
set_Value (COLUMNNAME_Root_Record_ID, null);
else
set_Value (COLUMNNAME_Root_Record_ID, Root_Record_ID);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Record_Warning.java | 1 |
请完成以下Java代码 | public class Add_Tables_to_DLM
extends JavaProcess
implements IProcessDefaultParametersProvider
{
@Param(mandatory = true, parameterName = I_DLM_Partition_Config.COLUMNNAME_DLM_Partition_Config_ID)
private I_DLM_Partition_Config configDB;
/**
* Iterate the {@link I_DLM_Partition_Config_Line}s and handle thei... | trxManager.runInNewTrx(new TrxRunnable()
{
@Override
public void run(String localTrxName) throws Exception
{
dlmService.addTableToDLM(dlm_Referencing_Table);
}
});
}
return MSG_OK;
}
@Override
public Object getParameterDefaultValue(final IProcessDefaultParameter parameter)
{
final... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\process\Add_Tables_to_DLM.java | 1 |
请完成以下Java代码 | public class HeaderFooter
{
/**
* Standard Constructor
* @param ctx context
*/
public HeaderFooter (Properties ctx)
{
m_ctx = ctx;
} // HeaderFooter
/** Context */
private Properties m_ctx;
/** Header/Footer content */
private ArrayList<PrintElement> m_elements = new ArrayList<PrintElement>(... | Point pageStart = new Point(bounds.getLocation());
getElements();
for (int i = 0; i < m_pe.length; i++)
m_pe[i].paint(g2D, 0, pageStart, m_ctx, isView);
} // paint
/**
* Get DrillDown value
* @param relativePoint relative Point
* @return if found NamePait or null
*/
public MQuery getDrillDown (Poi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\HeaderFooter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Long getMpsWeight() {
return mpsWeight;
}
/**
* Sets the value of the mpsWeight property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setMpsWeight(Long value) {
this.mpsWeight = value;
}
/**
* Ge... | *
* @return
* possible object is
* {@link Address }
*
*/
public Address getSender() {
return sender;
}
/**
* Sets the value of the sender property.
*
* @param value
* allowed object is
* {@link Address }
*
*/
... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\GeneralShipmentData.java | 2 |
请完成以下Java代码 | public DataFormatException unableToCreateTransformer(Exception cause) {
return new DataFormatException(exceptionMessage("007", "Unable to create a transformer to write element"), cause);
}
public DataFormatException unableToTransformElement(Node element, Exception cause) {
return new DataFormatException(ex... | }
public DataFormatException unableToCreateContext(Throwable cause) {
return new DataFormatException(exceptionMessage("012", "Cannot create context"), cause);
}
public DataFormatException unableToCreateUnmarshaller(Throwable cause) {
return new DataFormatException(exceptionMessage("013", "Cannot create ... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\format\xml\DomXmlLogger.java | 1 |
请完成以下Java代码 | public void setPackVerificationMessage (java.lang.String PackVerificationMessage)
{
set_Value (COLUMNNAME_PackVerificationMessage, PackVerificationMessage);
}
/** Get Verification Message.
@return Verification Message */
@Override
public java.lang.String getPackVerificationMessage ()
{
return (java.lang... | /** Get Kodierungskennzeichen.
@return Kodierungskennzeichen
*/
@Override
public java.lang.String getProductCodeType ()
{
return (java.lang.String)get_Value(COLUMNNAME_ProductCodeType);
}
/**
* SerialNumber AD_Reference_ID=110
* Reference name: AD_User
*/
public static final int SERIALNUMBER_AD_Re... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java-gen\de\metas\vertical\pharma\securpharm\model\X_M_Securpharm_Productdata_Result.java | 1 |
请完成以下Java代码 | public String outputFile(TableInfo tableInfo) {
// Mapper
String xmlUrl = projectPath + "/src/main/resources/mapper/" + module
+ "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
System.out.println("xml path:"+xmlUrl);
... | strategy.setColumnNaming(NamingStrategy.underline_to_camel);
strategy.setEntityLombokModel(true);
strategy.setRestControllerStyle(true);
// common file
//strategy.setSuperEntityColumns("id");
strategy.setInclude(scanner("tablename,multi can be seperated ,").split(","));
s... | repos\springboot-demo-master\dynamic-datasource\src\main\java\com\et\dynamic\datasource\GeneratorCode.java | 1 |
请完成以下Java代码 | public boolean hasParameter(final String parameterName)
{
return false;
}
@Override
public Object getParameterAsObject(final String parameterName)
{
return null;
}
@Override
public String getParameterAsString(final String parameterName)
{
return null;
}
@Override
public int getParameterAsInt(final ... | public ZonedDateTime getParameterAsZonedDateTime(final String parameterName)
{
return null;
}
@Nullable
@Override
public Instant getParameterAsInstant(final String parameterName)
{
return null;
}
@Override
public BigDecimal getParameterAsBigDecimal(final String paraCheckNetamttoinvoice)
{
return null;... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\NullParams.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class GrpcSslConfigurer extends AbstractSslConfigurer<NettyChannelBuilder, ManagedChannel> {
public GrpcSslConfigurer(HttpClientProperties.Ssl sslProperties, SslBundles bundles) {
super(sslProperties, bundles);
}
@Override
public ManagedChannel configureSsl(NettyChannelBuilder NettyChannelBuilder) throws... | }
if (!useInsecureTrustManager && ssl.getTrustedX509Certificates().size() > 0) {
sslContextBuilder.trustManager(getTrustedX509CertificatesForTrustManager());
}
else if (bundle != null) {
sslContextBuilder.trustManager(bundle.getManagers().getTrustManagerFactory());
}
if (bundle != null) {
sslContex... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\GrpcSslConfigurer.java | 2 |
请完成以下Java代码 | public static class KeyValue {
private final String key;
private final String value;
public KeyValue(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public String getValue() { | return value;
}
@Override
public String toString() {
return new ToStringCreator(this).append("name", key).append("value", value).toString();
}
public static KeyValue valueOf(String s) {
String[] tokens = StringUtils.tokenizeToStringArray(s, ":", true, true);
Assert.isTrue(tokens.length == 2, () -> ... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\common\KeyValues.java | 1 |
请完成以下Java代码 | public void setC_Invoice_ID (int C_Invoice_ID)
{
if (C_Invoice_ID < 1)
set_Value (COLUMNNAME_C_Invoice_ID, null);
else
set_Value (COLUMNNAME_C_Invoice_ID, Integer.valueOf(C_Invoice_ID));
}
/** Get Rechnung.
@return Invoice Identifier
*/
@Override
public int getC_Invoice_ID ()
{
Integer ii = (... | @return Im Fall von ESR oder anderen von Zahlschein gelesenen Zahlungsaufforderungen ist dies der komplette vom Schein eingelesene String
*/
@Override
public java.lang.String getFullPaymentString ()
{
return (java.lang.String)get_Value(COLUMNNAME_FullPaymentString);
}
/** Set Sales Transaction.
@param IsS... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\de\metas\banking\model\X_C_Payment_Request.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Map<String, Meter> getMeter() {
return this.meter;
}
/**
* Per-meter settings.
*/
public static class Meter {
/**
* Maximum number of buckets to be used for exponential histograms, if configured.
* This has no effect on explicit bucket histograms.
*/
private @Nullable Integer maxBucketCou... | public @Nullable Integer getMaxBucketCount() {
return this.maxBucketCount;
}
public void setMaxBucketCount(@Nullable Integer maxBucketCount) {
this.maxBucketCount = maxBucketCount;
}
public @Nullable HistogramFlavor getHistogramFlavor() {
return this.histogramFlavor;
}
public void setHistogramFl... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<String> getTrustedX509Certificates() {
return trustedX509Certificates;
}
public void setTrustedX509Certificates(List<String> trustedX509) {
this.trustedX509Certificates = trustedX509;
}
public boolean isUseInsecureTrustManager() {
return useInsecureTrustManager;
}
public void setUseI... | .toString();
}
}
public static class Websocket {
/** Max frame payload length. */
private Integer maxFramePayloadLength;
/** Proxy ping frames to downstream services, defaults to true. */
private boolean proxyPing = true;
public Integer getMaxFramePayloadLength() {
return this.maxFramePayloadLengt... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\HttpClientProperties.java | 2 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return pas... | public void setEmail(String email) {
this.email = email;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
} | repos\spring-boot-leaning-master\1.x\第16课:综合实战用户管理系统\user-manage\src\main\java\com\neo\param\UserParam.java | 1 |
请完成以下Java代码 | public List<BookDTO> getAllBooks() {
log.debug("REST request to get all Books");
return bookService.findAll();
}
/**
* GET /books/:id : get the "id" book.
*
* @param id the id of the bookDTO to retrieve
* @return the ResponseEntity with status 200 (OK) and with body the boo... | * DELETE /books/:id : delete the "id" book.
*
* @param id the id of the bookDTO to delete
* @return the ResponseEntity with status 200 (OK)
*/
@DeleteMapping("/books/{id}")
public ResponseEntity<Void> deleteBook(@PathVariable Long id) {
log.debug("REST request to delete Book : {}", ... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\web\rest\BookResource.java | 1 |
请完成以下Java代码 | public void setTitle(String value) {
set(2, value);
}
/**
* Getter for <code>public.Book.title</code>.
*/
public String getTitle() {
return (String) get(2);
}
/**
* Setter for <code>public.Book.description</code>.
*/
public void setDescription(String value) ... | // Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<Integer> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Constructors
// --------... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\jointables\public_\tables\records\BookRecord.java | 1 |
请完成以下Java代码 | public int getC_CountryArea_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_CountryArea_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name Name */
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@r... | Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Override
public void setValue (java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Suchschlüssel.
@return Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Override
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CountryArea.java | 1 |
请完成以下Java代码 | public List<Long> getPzn() {
if (pzn == null) {
pzn = new ArrayList<Long>();
}
return this.pzn;
}
/**
* Gets the value of the pznBlock property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getPznBlock... | */
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VerfuegbarkeitsanfrageBulk.java | 1 |
请完成以下Java代码 | private WebuiHUTransformCommandResult action_SplitTU_To_NewLU(
final HUEditorRow tuRow, final I_M_HU_PI_Item huPIItem, final QtyTU qtyTU, final boolean isOwnPackingMaterials)
{
final List<I_M_HU> createdHUs = newHUTransformation().tuToNewLUs(tuRow.getM_HU(), qtyTU, huPIItem, isOwnPackingMaterials).getLURecords();... | final I_M_HU fromTopLevelHU = handlingUnitsBL.getTopLevelParent(fromTU);
final List<I_M_HU> createdHUs = newHUTransformation().tuToNewTUs(fromTU, qtyTU).getAllTURecords();
final ImmutableSet<HuId> huIdsToAddToView = createdHUs.stream()
.map(I_M_HU::getM_HU_ID)
.map(HuId::ofRepoId)
.collect(ImmutableSe... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WebuiHUTransformCommand.java | 1 |
请完成以下Java代码 | private I_M_Movement getMovementHeaderOrNull()
{
return movementHeader;
}
private void addOrUpdateMovementLine(@NonNull final IHUProductStorage productStorage)
{
// Skip it if product storage is empty
if (productStorage.isEmpty())
{
return;
}
final ProductId productId = productStorage.getProductId(... | movementLine.setIsPackagingMaterial(false);
movementLine.setM_Product_ID(productId.getRepoId());
movementLine.setM_Locator_ID(locatorFromId.getRepoId());
movementLine.setM_LocatorTo_ID(request.getToLocatorId().getRepoId());
//
// Reference
if (request.getDdOrderLineId() != null)
{
movementLine.setDD... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\movement\generate\HUMovementGenerator.java | 1 |
请完成以下Java代码 | public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
@Override
public void setTaxAmt (final BigDecimal TaxAmt)
{
set_ValueNoCheck (COLUMNNAME_TaxAmt, TaxAmt);
}
@Override
public BigDecimal getTaxAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxAmt);
ret... | }
@Override
public void setTaxBaseAmt (final BigDecimal TaxBaseAmt)
{
set_ValueNoCheck (COLUMNNAME_TaxBaseAmt, TaxBaseAmt);
}
@Override
public BigDecimal getTaxBaseAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxBaseAmt);
return bd != null ? bd : BigDecimal.ZERO;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceTax.java | 1 |
请完成以下Java代码 | public void setIsInterface (boolean IsInterface)
{
set_Value (COLUMNNAME_IsInterface, Boolean.valueOf(IsInterface));
}
/** Get Interface.
@return Interface */
@Override
public boolean isInterface ()
{
Object oo = get_Value(COLUMNNAME_IsInterface);
if (oo != null)
{
if (oo instanceof Boolean)
... | @param Name
Alphanumeric identifier of the entity
*/
@Override
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(COLUMN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\javaclasses\model\X_AD_JavaClass.java | 1 |
请完成以下Java代码 | class CacheEvaluationContext extends MethodBasedEvaluationContext {
private final Set<String> unavailableVariables = new HashSet<String>(1);
CacheEvaluationContext(Object rootObject, Method method, Object[] arguments,
ParameterNameDiscoverer parameterNameDiscoverer) {
super(rootObject, method, arguments, par... | public void addUnavailableVariable(String name) {
this.unavailableVariables.add(name);
}
/**
* Load the param information only when needed.
*/
@Override
public Object lookupVariable(String name) {
if (this.unavailableVariables.contains(name)) {
throw new VariableNotAvailableException(name);
}
retur... | repos\spring-boot-student-master\spring-boot-student-cache-redis\src\main\java\com\xiaolyuh\redis\cache\expression\CacheEvaluationContext.java | 1 |
请完成以下Java代码 | public HuIdsFilterList acceptAll()
{
return HuIdsFilterList.ALL;
}
@Override
public HuIdsFilterList acceptAllBut(@NonNull final Set<HuId> alwaysIncludeHUIds, @NonNull final Set<HuId> excludeHUIds)
{
if (excludeHUIds.isEmpty())
{
return HuIdsFilterList.ALL;
}
else
{
retu... | public synchronized <T> T convert(@NonNull final CaseConverter<T> converter)
{
if (initialHUQuery == null)
{
if (initialHUIds == null)
{
throw new IllegalStateException("initialHUIds shall not be null for " + this);
}
else if (initialHUIds.isAll())
{
if (mustHUIds.isEmpty() && shallNotHUIds.... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\filter\HUIdsFilterData.java | 1 |
请完成以下Spring Boot application配置 | com:
baeldung:
twilio:
account-sid: ${TWILIO_ACCOUNT_SID}
auth-token: ${TWILIO_AUTH_TOKEN}
messaging-sid: ${TWILIO_MESSAGING_SID}
new-article- | notification:
content-sid: ${NEW_ARTICLE_NOTIFICATION_CONTENT_SID} | repos\tutorials-master\saas-modules\twilio-whatsapp\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public BigDecimal getOverUnderAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OverUnderAmt);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Remaining Amt.
@param RemainingAmt
Remaining Amount
*/
public void setRemainingAmt (BigDecimal RemainingAmt)
{
throw new IllegalArgument... | public void setWriteOffAmt (BigDecimal WriteOffAmt)
{
set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt);
}
/** Get Write-off Amount.
@return Amount to write-off
*/
public BigDecimal getWriteOffAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt);
if (bd == null)
return Env.ZERO;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaymentAllocate.java | 1 |
请完成以下Java代码 | private void get(Table table) throws IOException {
System.out.println("\n*** GET example ~fetching the data in Family1:Qualifier1~ ***");
Get g = new Get(row1);
Result r = table.get(g);
byte[] value = r.getValue(family1.getBytes(), qualifier1);
System.out.println("Fetched value... | }
if (!admin.tableExists(table1)) {
createTable(admin);
}
Table table = connection.getTable(table1);
put(admin, table);
get(table);
scan(table);
filters(table);
delete(table);
}
}
private v... | repos\tutorials-master\persistence-modules\hbase\src\main\java\com\baeldung\hbase\HBaseClientOperations.java | 1 |
请完成以下Java代码 | public FormalExpression newInstance(ModelTypeInstanceContext instanceContext) {
return new FormalExpressionImpl(instanceContext);
}
});
languageAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_LANGUAGE)
.build();
evaluatesToTypeRefAttribute = typeBuilder.stringAttribute(BPM... | return languageAttribute.getValue(this);
}
public void setLanguage(String language) {
languageAttribute.setValue(this, language);
}
public ItemDefinition getEvaluatesToType() {
return evaluatesToTypeRefAttribute.getReferenceTargetElement(this);
}
public void setEvaluatesToType(ItemDefinition eval... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\FormalExpressionImpl.java | 1 |
请完成以下Java代码 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
public void setBeanName(String name) {
this.beanName = name;
}
@Override
public Map<String, String> getProperties() {
return properties;
}
public ... | } catch (Exception e) {
throw new RuntimeException(e);
}
}
public void start() {
deploy();
}
public void stop() {
undeploy();
}
public void afterPropertiesSet() throws Exception {
// for backwards compatibility
start();
}
public void destroy() throws Exception {
// for ... | repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\application\SpringProcessApplication.java | 1 |
请完成以下Java代码 | public PageData<NotificationRule> findByTenantId(UUID tenantId, PageLink pageLink) {
return DaoUtil.toPageData(notificationRuleRepository.findByTenantId(tenantId, DaoUtil.toPageable(pageLink)));
}
@Override
public NotificationRuleId getExternalIdByInternal(NotificationRuleId internalId) {
r... | protected Class<NotificationRuleEntity> getEntityClass() {
return NotificationRuleEntity.class;
}
@Override
protected JpaRepository<NotificationRuleEntity, UUID> getRepository() {
return notificationRuleRepository;
}
@Override
public EntityType getEntityType() {
return ... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\notification\JpaNotificationRuleDao.java | 1 |
请完成以下Java代码 | public static List<EngineInfo> getCmmnEngineInfos() {
return cmmnEngineInfos;
}
/**
* Get initialization results. Only info will we available for cmmn engines which were added in the {@link CmmnEngines#init()}. No {@link EngineInfo} is available for engines which were registered
* programmati... | for (String cmmnEngineName : engines.keySet()) {
CmmnEngine cmmnEngine = engines.get(cmmnEngineName);
try {
cmmnEngine.close();
} catch (Exception e) {
LOGGER.error("exception while closing {}", (cmmnEngineName == null ? "the defaul... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\CmmnEngines.java | 1 |
请完成以下Java代码 | public class Store {
@Id
private String id;
private String name;
public Store() {
}
public Store(String name) {
super();
this.name = name;
}
public String getId() { | return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-2\src\main\java\com\baeldung\boot\collection\name\data\Store.java | 1 |
请完成以下Java代码 | public class UserDetailVO {
/**
* 用户编号
*/
private Integer id;
/**
* 账号
*/
private String username;
/**
* 密码(明文)
*
* ps:生产环境下,千万不要明文噢
*/
private String password;
/**
* 性别
*/
private Integer gender;
/**
* 创建时间
*/
private ... | public UserDetailVO setPassword(String password) {
this.password = password;
return this;
}
public Integer getGender() {
return gender;
}
public UserDetailVO setGender(Integer gender) {
this.gender = gender;
return this;
}
public Date getCreateTime() {
... | repos\SpringBoot-Labs-master\lab-12-mybatis\lab-12-mybatis-plus-tenant\src\main\java\cn\iocoder\springboot\lab12\mybatis\vo\UserDetailVO.java | 1 |
请完成以下Java代码 | public int hashCode() {
return Objects.hash(
super.hashCode(),
id,
name,
processDefinitionId,
processDefinitionKey,
initiator,
startDate,
completedDate,
businessKey,
status,
parent... | parentId +
'\'' +
", initiator='" +
initiator +
'\'' +
", startDate=" +
startDate +
", completedDate=" +
completedDate +
", businessKey='" +
businessKey +
'\'' +
", status=" +
... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\ProcessInstanceImpl.java | 1 |
请完成以下Java代码 | public void setAD_Process_Para_ID (int AD_Process_Para_ID)
{
if (AD_Process_Para_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Process_Para_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Process_Para_ID, Integer.valueOf(AD_Process_Para_ID));
}
/** Get Prozess-Parameter.
@return Prozess-Parameter */
@Ove... | }
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Beschreibung.
@return Beschreibung */
@Override
public java.lang.String getDescription ()
{
return (java.lan... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Scheduler_Para.java | 1 |
请完成以下Java代码 | public <T> void warnUp(final Collection<T> objects, Function<T, ProductId> productIdMapper)
{
final ImmutableSet<ProductId> productIds = objects.stream().map(productIdMapper).collect(ImmutableSet.toImmutableSet());
getByIds(productIds);
}
public ProductInfo getById(@NonNull final ProductId productId)
{
final... | return productBL.getByIds(productIds)
.stream()
.map(ProductsLoadingCache::fromRecord)
.collect(ImmutableMap.toImmutableMap(ProductInfo::getProductId, productInfo -> productInfo));
}
private static ProductInfo fromRecord(final I_M_Product product)
{
final ProductId productId = ProductId.ofRepoId(produ... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\products\ProductsLoadingCache.java | 1 |
请完成以下Java代码 | public class ActorGsonDeserializer implements JsonDeserializer<ActorGson> {
private final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
@Override
public ActorGson deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseExce... | for (int i = 0; i < jsonFilmography.size(); i++) {
filmList.add(jsonFilmography.get(i).getAsString());
}
}
ActorGson actorGson = null;
try {
actorGson = new ActorGson(jsonImdbId.getAsString(), sdf.parse(jsonDateOfBirth.getAsString()), filmList);
}... | repos\tutorials-master\json-modules\gson\src\main\java\com\baeldung\gson\serialization\ActorGsonDeserializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AuthenticationFilter implements Filter
{
private static final String HEADER_AUTH_TOKEN = "X-Auth-Token";
private final AuthenticationManager authenticationManager;
public AuthenticationFilter(@NotNull final AuthenticationManager authenticationManager)
{
this.authenticationManager = authenticationMa... | final String token = httpRequest.getHeader(HEADER_AUTH_TOKEN);
try
{
final PreAuthenticatedAuthenticationToken preAuthenticatedAuthenticationToken = new PreAuthenticatedAuthenticationToken(token, null);
final Authentication authentication = authenticationManager.authenticate(preAuthenticatedAuthenticationTo... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\restapi\auth\AuthenticationFilter.java | 2 |
请完成以下Java代码 | protected boolean beforeDelete()
{
// Clean own index
MIndex.cleanUp(get_TrxName(), getAD_Client_ID(), get_Table_ID(), get_ID());
// Clean ElementIndex
MContainerElement[] theseElements = getAllElements();
if (theseElements!=null)
{
for (int i=0;i<theseElements.length;i++)
{
theseElements[i].del... | log.debug("#" + no + " - TreeType=CMC");
else
log.warn("#" + no + " - TreeType=CMC");
return true;
} // afterDelete
/**
* reIndex
* @param newRecord
*/
public void reIndex(boolean newRecord)
{
String [] toBeIndexed = new String[8];
toBeIndexed[0] = this.getName();
toBeIndexed[1] = this.getDesc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MContainer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | boolean addIfAbsent(ItemMetadata metadata) {
ItemMetadata existing = find(metadata.getName());
if (existing != null) {
return false;
}
add(metadata);
return true;
}
void add(ItemHint itemHint) {
this.metadataHints.add(itemHint);
}
boolean hasSimilarGroup(ItemMetadata metadata) {
if (!metadata.isO... | }
if (this.previousMetadata != null) {
List<ItemMetadata> items = this.previousMetadata.getItems();
for (ItemMetadata item : items) {
if (this.mergeRequired.test(item)) {
metadata.addIfMissing(item);
}
}
}
return metadata;
}
private ItemMetadata find(String name) {
return this.metadataI... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\MetadataCollector.java | 2 |
请完成以下Java代码 | public void eraseCredentials() {
super.eraseCredentials();
this.credentials = null;
}
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 Ab... | }
@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 CasServiceTicketAuthenticationToken(this);
}
... | repos\spring-security-main\cas\src\main\java\org\springframework\security\cas\authentication\CasServiceTicketAuthenticationToken.java | 1 |
请完成以下Java代码 | protected PlanItemInstanceEntityManager getPlanItemInstanceEntityManager() {
return cmmnEngineConfiguration.getPlanItemInstanceEntityManager();
}
protected SentryPartInstanceEntityManager getSentryPartInstanceEntityManager() {
return cmmnEngineConfiguration.getSentryPartInstanceEntityManage... | }
protected EntityLinkEntityManager getEntityLinkEntityManager() {
return cmmnEngineConfiguration.getEntityLinkServiceConfiguration().getEntityLinkEntityManager();
}
protected HistoricEntityLinkEntityManager getHistoricEntityLinkEntityManager() {
return cmmnEngineConfiguration.getE... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\AbstractCmmnManager.java | 1 |
请完成以下Java代码 | public class EntitiesRelatedEntityIdAsyncLoader {
public static ListenableFuture<EntityId> findEntityAsync(
TbContext ctx,
EntityId originator,
RelationsQuery relationsQuery
) {
var relationService = ctx.getRelationService();
var query = buildQuery(originator... | return Futures.immediateFailedFuture(new IllegalStateException("Unknown direction"));
}
private static EntityRelationsQuery buildQuery(EntityId originator, RelationsQuery relationsQuery) {
var query = new EntityRelationsQuery();
var parameters = new RelationsSearchParameters(
or... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\util\EntitiesRelatedEntityIdAsyncLoader.java | 1 |
请完成以下Java代码 | public List<BestellungAuftrag> getAuftraege() {
if (auftraege == null) {
auftraege = new ArrayList<BestellungAuftrag>();
}
return this.auftraege;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
... | /**
* Gets the value of the bestellSupportId property.
*
*/
public int getBestellSupportId() {
return bestellSupportId;
}
/**
* Sets the value of the bestellSupportId property.
*
*/
public void setBestellSupportId(int value) {
this.bestellSupportId = valu... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\Bestellung.java | 1 |
请完成以下Java代码 | public class HUInvoiceHistoryDAO extends AbstractInvoiceHistoryDAO
{
@Override
public String buildStorageInvoiceHistorySQL(final boolean showDetail, final int warehouseId, final int asiId)
{
final StringBuilder sql = new StringBuilder("SELECT ")
.append("s.").append(I_RV_M_HU_Storage_InvoiceHistory.COLUMNNAME_... | if (warehouseId != 0)
{
sql.append(" AND (1=1 OR l.M_Warehouse_ID=?)"); // Note the 1=1; We're mocking the warehouse filter to preserve legacy code and not screw with the prepared statement
}
if (asiId > 0)
{
sql.append(" OR GenerateHUStorageASIKey(?)=s.").append(I_RV_M_HU_Storage_InvoiceHistory.COLUMNNA... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\org\compiere\apps\search\dao\impl\HUInvoiceHistoryDAO.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.