instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public boolean has_Variable(final String variableName)
{
return params.hasParameter(variableName);
}
@SuppressWarnings("unchecked")
@Override
public <T> T get_ValueAsObject(final String variableName)
{
return (T)params.getParameterAsObject(variableName);
}
@Override
public BigDecimal get_Value... | final int defaultValueInt = defaultValue != null ? defaultValue : 0;
return params.getParameterAsInt(variableName, defaultValueInt);
}
@Override
public String get_ValueAsString(final String variableName)
{
return params.getParameterAsString(variableName);
}
@Override
public String get_ValueOldAsSt... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\util\Evaluatees.java | 1 |
请完成以下Java代码 | public void setConnectionFactory(ConnectionFactory connectionFactory) {
this.connectionFactory = connectionFactory;
}
/**
* @return The ConnectionFactory that this accessor uses for obtaining RabbitMQ {@link Connection Connections}.
*/
public ConnectionFactory getConnectionFactory() {
return this.connection... | * @return an appropriate Channel fetched from the holder, or <code>null</code> if none found
*/
protected @Nullable Channel getChannel(RabbitResourceHolder holder) {
return holder.getChannel();
}
protected RabbitResourceHolder getTransactionalResourceHolder() {
return ConnectionFactoryUtils.getTransactionalRe... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\RabbitAccessor.java | 1 |
请完成以下Java代码 | public java.lang.String getDocBaseType ()
{
return (java.lang.String)get_Value(COLUMNNAME_DocBaseType);
}
/** Set Standard.
@param IsDefault
Default value
*/
@Override
public void setIsDefault (boolean IsDefault)
{
set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault));
}
/** Get Standard.
... | return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
@Override
public java.lang.String getName ()
{
retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocLine_Sort.java | 1 |
请完成以下Java代码 | public static ROW setValue(@NonNull final GetValueRequest request, @Nullable final String newValue)
{
final COL col = extractCOL(request);
if (col == null)
{
throw new RuntimeException("Unable to find COL for request=" + request);
}
final Map<String, Integer> fieldName2Index = request.getFieldName2Index(... | }
@Builder
@Getter
public static class GetValueRequest
{
@NonNull
private final ROW row;
@NonNull
private final Map<String, Integer> fieldName2Index;
@NonNull
private final String fieldName;
}
} | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-filemaker\src\main\java\de\metas\common\filemaker\FileMakerDataHelper.java | 1 |
请完成以下Java代码 | public List<Element> getAllTitles() {
try {
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(this.getFile());
Element tutorials = doc.getRootElement();
List<Element> titles = tutorials.getChildren("tutorial");
return titles;
... | return node.get(0);
} catch (JDOMException | IOException e) {
e.printStackTrace();
return null;
}
}
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
} | repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\JDomParser.java | 1 |
请完成以下Java代码 | public static void propagateBpmnError(BpmnError error, ActivityExecution execution) throws Exception {
propagateError(error.getErrorCode(), error.getMessage(), null, execution);
}
public static void propagateError(String errorCode, String errorMessage, Exception origException, ActivityExecution execution) thro... | if (origException == null) {
if (Context.getCommandContext().getProcessEngineConfiguration().isEnableExceptionsAfterUnhandledBpmnError()) {
throw LOG.missingBoundaryCatchEventError(execution.getActivity().getId(), errorCode, errorMessage);
} else {
LOG.missingBoundaryCatchEvent(exec... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\helper\BpmnExceptionHandler.java | 1 |
请完成以下Java代码 | public OrderItemBuilder dimension(final Dimension dimension)
{
innerBuilder.dimension(dimension);
return this;
}
public PurchaseOrderItem buildAndAddToParent()
{
final PurchaseOrderItem newItem = innerBuilder.build();
parent.purchaseOrderItems.add(newItem);
return newItem;
}
}
public OrderI... | "The given purchaseOrderItem's purchaseCandidateId needs to be equal to this instance's id; purchaseOrderItem={}; this={}",
purchaseOrderItem, this);
purchaseOrderItems.add(purchaseOrderItem);
}
public Quantity getPurchasedQty()
{
return purchaseOrderItems.stream()
.map(PurchaseOrderItem::getPurchasedQ... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\PurchaseCandidate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class CassandraAbstractAsyncDao extends CassandraAbstractDao {
protected ExecutorService readResultsProcessingExecutor;
@Value("${cassandra.query.result_processing_threads:50}")
private int threadPoolSize;
@PostConstruct
public void startExecutor() {
readResultsProcessingE... | public T apply(@Nullable TbResultSet input) {
return transformer.apply(input);
}
}, readResultsProcessingExecutor);
}
protected <T> ListenableFuture<T> getFutureAsync(TbResultSetFuture future, com.google.common.util.concurrent.AsyncFunction<TbResultSet, T> transformer) {
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\nosql\CassandraAbstractAsyncDao.java | 2 |
请完成以下Java代码 | public java.math.BigDecimal getPrev_CurrentQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Prev_CurrentQty);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Menge.
@param Qty
Menge
*/
@Override
public void setQty (java.math.BigDecimal Qty)
{ | set_ValueNoCheck (COLUMNNAME_Qty, Qty);
}
/** Get Menge.
@return Menge
*/
@Override
public java.math.BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector_CostDetailAdjust.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSourceRef() {
return sourceRef;
}
public void setSourceRef(String sourceRef) {
this.sourceRef = sourceRef;
}
public String getTargetRef() {... | this.messageRef = messageRef;
}
public String toString() {
return sourceRef + " --> " + targetRef;
}
public MessageFlow clone() {
MessageFlow clone = new MessageFlow();
clone.setValues(this);
return clone;
}
public void setValues(MessageFlow otherFlow) {
... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\MessageFlow.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class GetCurrenciesRoute extends RouteBuilder
{
public static final String GET_CURRENCY_ROUTE_ID = "Shopware6-getCurrencies";
private final ProcessLogger processLogger;
public GetCurrenciesRoute(@NonNull final ProcessLogger processLogger)
{
this.processLogger = processLogger;
}
@Override
public void... | final PInstanceLogger pInstanceLogger = PInstanceLogger.of(processLogger);
final ShopwareClient shopwareClient = ShopwareClient
.of(getCurrenciesRequest.getClientId(), getCurrenciesRequest.getClientSecret(), getCurrenciesRequest.getBaseUrl(), pInstanceLogger);
final JsonCurrencies currencies = shopwareClient.... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\currency\GetCurrenciesRoute.java | 2 |
请完成以下Java代码 | public int getPort() {
return randomPort;
}
public void startTomcat() throws LifecycleException {
tomcat = new Tomcat();
tomcat.setPort(randomPort);
tomcat.setHostname("localhost");
String appBase = ".";
tomcat.getHost().setAppBase(appBase);
File docBase... | FilterMap myFilterMap = new FilterMap();
myFilterMap.setFilterName(filterClass.getSimpleName());
myFilterMap.addURLPattern("/my-servlet/*");
context.addFilterMap(myFilterMap);
tomcat.start();
// uncomment for live test
// tomcat
// .getServer()
// .await(... | repos\tutorials-master\libraries-server-2\src\main\java\com\baeldung\tomcat\ProgrammaticTomcat.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Map<PaymentTermId, List<I_C_PaymentTerm_Break>> retrievePaymentTermBreakRecords(@NonNull final Set<PaymentTermId> paymentTermIds)
{
if (paymentTermIds.isEmpty())
{
return ImmutableMap.of();
}
final Map<PaymentTermId, List<I_C_PaymentTerm_Break>> result = queryBL.createQueryBuilder(I_C_PaymentTerm_B... | }
public void syncStateToDatabase(final Set<PaymentTermId> paymentTermIds)
{
if (paymentTermIds.isEmpty()) {return;}
trxManager.runInThreadInheritedTrx(() -> {
warmUpByIds(paymentTermIds);
for (final PaymentTermId paymentTermId : paymentTermIds)
{
final PaymentTerm paymentTerm = loadById(paymentTe... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\paymentterm\repository\impl\PaymentTermLoaderAndSaver.java | 2 |
请完成以下Java代码 | protected void initDao() {
if (this.createTableOnStartup) {
getTemplate().execute(CREATE_TABLE_SQL);
}
}
@Override
public void createNewToken(PersistentRememberMeToken token) {
getTemplate().update(this.insertTokenSql, token.getUsername(), token.getSeries(), token.getTokenValue(),
token.getDate());
}
... | catch (DataAccessException ex) {
this.logger.error("Failed to load token for series " + seriesId, ex);
}
return null;
}
private PersistentRememberMeToken createRememberMeToken(ResultSet rs, int rowNum) throws SQLException {
return new PersistentRememberMeToken(rs.getString(1), rs.getString(2), rs.getString(... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\rememberme\JdbcTokenRepositoryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JcaWorkManagerExecutorService implements Referenceable, ExecutorService {
public static int START_WORK_TIMEOUT = 1500;
private static Logger logger = Logger.getLogger(JcaWorkManagerExecutorService.class.getName());
protected final JcaExecutorServiceConnector ra;
protected WorkManager workMan... | return true;
} catch (WorkRejectedException e) {
logger.log(Level.FINE, "WorkRejectedException while scheduling jobs for execution", e);
} catch (WorkException e) {
logger.log(Level.WARNING, "WorkException while scheduling jobs for execution", e);
}
return false;
}... | repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\JcaWorkManagerExecutorService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private boolean isMatch(@Nullable String value, String requiredValue) {
if (StringUtils.hasLength(requiredValue)) {
return requiredValue.equalsIgnoreCase(value);
}
return !"false".equalsIgnoreCase(value);
}
@Override
public String toString() {
StringBuilder result = new StringBuilder();
result... | else {
result.append("[");
result.append(StringUtils.arrayToCommaDelimitedString(this.names));
result.append("]");
}
if (StringUtils.hasLength(this.havingValue)) {
result.append("=").append(this.havingValue);
}
result.append(")");
return result.toString();
}
}
} | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\condition\OnPropertyCondition.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected void initDbSqlSessionFactory(AbstractEngineConfiguration engineConfiguration, AbstractEngineConfiguration targetEngineConfiguration) {
DbSqlSessionFactory dbSqlSessionFactory = engineConfiguration.getDbSqlSessionFactory();
targetEngineConfiguration.setDbSqlSessionFactory(engineConfiguration.ge... | throw new FlowableException("ProcessEngineConfiguration is required");
}
return processEngineConfiguration.buildProcessEngine();
}
public ProcessEngineConfiguration getProcessEngineConfiguration() {
return processEngineConfiguration;
}
public ProcessEngineConfigurator setProce... | repos\flowable-engine-main\modules\flowable-engine-configurator\src\main\java\org\flowable\engine\configurator\ProcessEngineConfigurator.java | 2 |
请完成以下Java代码 | private boolean proxyReceptorRequest(HttpServletRequest request) {
final boolean result = proxyReceptorConfigured() && this.proxyReceptorMatcher.matches(request);
this.logger.debug(LogMessage.format("proxyReceptorRequest = %s", result));
return result;
}
/**
* Determines if the {@link CasAuthenticationFilter... | CasAuthenticationFailureHandler(AuthenticationFailureHandler failureHandler) {
Assert.notNull(failureHandler, "failureHandler");
this.serviceTicketFailureHandler = failureHandler;
}
@Override
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,
AuthenticationExc... | repos\spring-security-main\cas\src\main\java\org\springframework\security\cas\web\CasAuthenticationFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | BeanDefinition getCsrfAuthenticationStrategy() {
BeanDefinitionBuilder csrfAuthenticationStrategy = BeanDefinitionBuilder
.rootBeanDefinition(CsrfAuthenticationStrategy.class);
csrfAuthenticationStrategy.addConstructorArgReference(this.csrfRepositoryRef);
if (StringUtils.hasText(this.requestHandlerRef)) {
c... | }
void setObservationRegistry(BeanMetadataElement observationRegistry) {
this.observationRegistry = observationRegistry;
}
private static final class DefaultRequiresCsrfMatcher implements RequestMatcher {
private final HashSet<String> allowedMethods = new HashSet<>(Arrays.asList("GET", "HEAD", "TRACE", "OPTIO... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\CsrfBeanDefinitionParser.java | 2 |
请完成以下Java代码 | public void setServiceFeeAmount (final @Nullable BigDecimal ServiceFeeAmount)
{
set_Value (COLUMNNAME_ServiceFeeAmount, ServiceFeeAmount);
}
@Override
public BigDecimal getServiceFeeAmount()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_ServiceFeeAmount);
return bd != null ? bd : BigDecimal.ZERO... | if (Source_BP_BankAccount_ID < 1)
set_Value (COLUMNNAME_Source_BP_BankAccount_ID, null);
else
set_Value (COLUMNNAME_Source_BP_BankAccount_ID, Source_BP_BankAccount_ID);
}
@Override
public int getSource_BP_BankAccount_ID()
{
return get_ValueAsInt(COLUMNNAME_Source_BP_BankAccount_ID);
}
@Override
pu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RemittanceAdvice.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyOrdered ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Reservierte Menge.
@param QtyReserved
Reservierte Menge
*/
public void setQtyReserved (BigDecimal QtyReserved)
{
set_Value (COLUMNNAME_QtyRe... | {
if (Ref_OrderLine_ID < 1)
set_Value (COLUMNNAME_Ref_OrderLine_ID, null);
else
set_Value (COLUMNNAME_Ref_OrderLine_ID, Integer.valueOf(Ref_OrderLine_ID));
}
/** Get Referenced Order Line.
@return Reference to corresponding Sales/Purchase Order
*/
public int getRef_OrderLine_ID ()
{
Integer ii ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_C_OrderLine_Overview.java | 1 |
请完成以下Java代码 | private void writeTradeData(MarketData data) {
try {
final int writtenBytes = MarketDataUtil.encodeAndWrite(buffer, data);
writePos.addAndGet(writtenBytes);
log.info("<writeTradeData> buffer size remaining: %{}, data: {}", 100 * buffer.remaining() / buffer.capacity(), data);
... | if (source.hasNext()) {
writeTradeData(source.next());
}
}, 1, 2, TimeUnit.SECONDS);
}
public static void main(String[] args) {
MarketDataStreamServer server = new MarketDataStreamServer();
Client client1 = server.newClient("client1");
client1.read();... | repos\tutorials-master\libraries-3\src\main\java\com\baeldung\sbe\MarketDataStreamServer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProductActivityProvider implements IProductActivityProvider
{
private final IAcctSchemaDAO acctSchemaDAO = Services.get(IAcctSchemaDAO.class);
private final ProductAccountsRepository productAccountsRepository;
public ProductActivityProvider(
@NonNull final ProductAccountsRepository productAccountsRe... | @Override
@Nullable
public ActivityId retrieveActivityForAcct(final ClientId clientId, final OrgId orgId, final ProductId productId)
{
final AcctSchemaId acctSchemaId = acctSchemaDAO.getAcctSchemaIdByClientAndOrg(clientId, orgId);
if (acctSchemaId == null)
{
return null;
}
return productAccountsReposit... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\api\ProductActivityProvider.java | 2 |
请完成以下Java代码 | public class TaxAuthorisation1 {
@XmlElement(name = "Titl")
protected String titl;
@XmlElement(name = "Nm")
protected String nm;
/**
* Gets the value of the titl property.
*
* @return
* possible object is
* {@link String }
*
*/
public String get... | /**
* Gets the value of the nm property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNm() {
return nm;
}
/**
* Sets the value of the nm property.
*
* @param value
* allowed object is
* {@... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TaxAuthorisation1.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HistoricMilestoneInstanceQueryRequest extends PaginateRequest {
private String id;
private String name;
private String caseInstanceId;
private String caseDefinitionId;
private Date reachedBefore;
private Date reachedAfter;
public String getId() {
return id;
}
... | return caseDefinitionId;
}
public void setCaseDefinitionId(String caseDefinitionId) {
this.caseDefinitionId = caseDefinitionId;
}
public Date getReachedBefore() {
return reachedBefore;
}
public void setReachedBefore(Date reachedBefore) {
this.reachedBefore = reachedBef... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\milestone\HistoricMilestoneInstanceQueryRequest.java | 2 |
请完成以下Java代码 | public void endElement(final String nameSpaceUri, final String localName, final String qName)
throws SAXException {
if (ATTRIBUTES.equals(localName)) {
this.foundAttributes = false;
this.currentAttribute = null;
} else if (this.foundAttributes) {
... | String result = "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>\r\n" +
" <cas:authenticationSuccess>\r\n" +
" <cas:user>admin</cas:user>\r\n" +
" <cas:attributes>\r\n" +
" <cas:credentialType>UsernamePasswordCredential</cas:credentialType>\r\n" +
" ... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\cas\util\XmlUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setTaskScheduler(TaskScheduler taskScheduler) {
this.taskScheduler = taskScheduler;
}
/**
* Set how often to run a task to check for failed consumers and idle containers.
* @param monitorInterval the interval; default 10000, but it will be adjusted down
* to the smallest of this, {@link #setIdleE... | * messages arrive. In that case, the actual time depends on the
* {@link #setMonitorInterval(long) monitorInterval}.
* @param ackTimeout the timeout in milliseconds (default 20000);
* @see #setMessagesPerAck(Integer)
*/
public void setAckTimeout(Long ackTimeout) {
this.ackTimeout = ackTimeout;
}
@Override... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\DirectRabbitListenerContainerFactory.java | 2 |
请完成以下Java代码 | public Object handleInvocation(ConnectorInvocation invocation) throws Exception {
request = invocation.getRequest();
target = invocation.getTarget();
if (proceed) {
return invocation.proceed();
} else {
return response;
}
}
public void setProceed(boolean proceed) {
this.proceed ... | this.response = response;
}
@SuppressWarnings("unchecked")
public <T> T getResponse() {
return (T) response;
}
@SuppressWarnings("unchecked")
public <T extends ConnectorRequest<?>> T getRequest() {
return (T) request;
}
@SuppressWarnings("unchecked")
public <T> T getTarget() {
return (T... | repos\camunda-bpm-platform-master\connect\core\src\main\java\org\camunda\connect\impl\DebugRequestInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Question {
@Id
private UUID id;
private String content;
@Convert(converter = YesNoConverter.class)
private Boolean correctAnswer;
@Convert(converter = TrueFalseConverter.class)
private Boolean shouldBeAsked;
@Convert(converter = NumericBooleanConverter.class)
private Bo... | }
public Boolean isEasy() {
return isEasy;
}
public Boolean getWasAskedBefore() {
return wasAskedBefore;
}
public void setId(UUID id) {
this.id = id;
}
public void setContent(String content) {
this.content = content;
}
public void setCorrectAnswer... | repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\booleanconverters\model\Question.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ModuleActivatorDescriptorsRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
public ModuleActivatorDescriptorsCollection getDescriptors()
{
final ImmutableList<ModuleActivatorDescriptor> descriptors = queryBL.createQueryBuilderOutOfTrx(I_AD_ModelValidator.class)
// .addOn... | {
final String modelValidationClass = record.getModelValidationClass();
if (Check.isEmpty(modelValidationClass, true))
{
return null;
}
return ModuleActivatorDescriptor.builder()
.id(record.getAD_ModelValidator_ID())
.classname(modelValidationClass.trim())
.seqNo(record.getSeqNo())
.active... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\modelvalidator\ModuleActivatorDescriptorsRepository.java | 2 |
请完成以下Java代码 | public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getProfess... | this.birthday = birthday;
}
public boolean isMarried() {
return married;
}
public void setMarried(boolean married) {
this.married = married;
}
public long getIncome() {
return income;
}
public void setIncome(long income) {
this.income = income;
}
... | repos\SpringBoot-Projects-FullStack-master\Part-5 Spring Boot Web Application\SpringBootFormValidationJSP\src\main\java\spring\validation\model\User.java | 1 |
请完成以下Java代码 | public FinishedGoodsReceiveLine getFinishedGoodsReceiveLineById(@NonNull final FinishedGoodsReceiveLineId finishedGoodsReceiveLineId)
{
return activities.stream()
.map(ManufacturingJobActivity::getFinishedGoodsReceive)
.filter(Objects::nonNull)
.map(finishedGoodsReceive -> finishedGoodsReceive.getLineByI... | .stream()
.map(activity -> activity.withChangedRawMaterialsIssue(mapper))
.collect(ImmutableList.toImmutableList());
return withActivities(updatedActivities);
}
public Stream<RawMaterialsIssueLine> streamRawMaterialsIssueLines()
{
return activities.stream()
.filter(ManufacturingJobActivity::isRawMa... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\model\ManufacturingJob.java | 1 |
请完成以下Java代码 | public void createNew(
@NonNull final OrderAndLineId orderAndLineId,
@NonNull final OrgId orgId,
@NonNull final OrderLineDetailCreateRequest request)
{
final I_C_OrderLine_Detail record = InterfaceWrapperHelper.newInstance(I_C_OrderLine_Detail.class);
record.setC_Order_ID(orderAndLineId.getOrderRepoId());... | {
queryBL.createQueryBuilder(I_C_OrderLine_Detail.class)
.addEqualsFilter(I_C_OrderLine_Detail.COLUMNNAME_C_Order_ID, orderId)
.create()
.deleteDirectly();
}
public void deleteByOrderLineId(@NonNull final OrderAndLineId orderAndLineId)
{
queryBL.createQueryBuilder(I_C_OrderLine_Detail.class)
.ad... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderLineDetailRepository.java | 1 |
请完成以下Java代码 | public class OrderPOReferenceListener implements IDocumentNoListener
{
public static OrderPOReferenceListener INSTANCE = new OrderPOReferenceListener();
private OrderPOReferenceListener()
{
}
@Override
public String getTableName()
{
return I_C_Order.Table_Name;
}
/**
* If the given order has a <code>Doc... | final I_C_Order order = InterfaceWrapperHelper.create(model, I_C_Order.class);
if (!Check.isEmpty(order.getPOReference(), true))
{
return; // the POReference is already set.
}
final String documentNo = order.getDocumentNo();
if(Check.isEmpty(documentNo, true))
{
return; // there is no documentNo to ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\document\documentNo\OrderPOReferenceListener.java | 1 |
请完成以下Java代码 | public static MobileApplicationPermissions ofCollection(final Collection<MobileApplicationPermission> collection)
{
return collection.isEmpty() ? EMPTY : new MobileApplicationPermissions(collection);
}
public static Collector<MobileApplicationPermission, ?, MobileApplicationPermissions> collect()
{
return Guav... | return MobileApplicationPermissions.ofCollection(resultMap.values());
}
@Override
public String toString()
{
final String permissionsName = getClass().getSimpleName();
final Collection<MobileApplicationPermission> permissionsList = byMobileApplicationId.values();
final StringBuilder sb = new StringBuilder()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\mobile_application\MobileApplicationPermissions.java | 1 |
请完成以下Java代码 | public static void createStdPeriods(final I_C_Year yearRecord, Locale locale, final Timestamp startDate, String dateFormat)
{
final Properties ctx = Env.getCtx();
final int calendarId = yearRecord.getC_Calendar_ID();
final int yearId = yearRecord.getC_Year_ID();
if (locale == null)
{
final MClient client... | final Timestamp start = new Timestamp(cal.getTimeInMillis());
final String name = formatter.format(start);
// get last day of same month
cal.add(Calendar.MONTH, 1);
cal.add(Calendar.DAY_OF_YEAR, -1);
final Timestamp end = new Timestamp(cal.getTimeInMillis());
//
MPeriod period = MPeriod.findByCalen... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MYear.java | 1 |
请完成以下Java代码 | public JSONLookupValue getLanguage()
{
final Language language = userSession.getLanguage();
return JSONLookupValue.of(language.getAD_Language(), language.getName());
}
@GetMapping("/workplace")
public JsonGetWorkplaceResponse getWorkplace(@RequestParam(name = "includeAvailable", required = false) final boolean... | }
@PutMapping("/workplace")
public void setWorkplace(@RequestBody @NonNull final JsonChangeWorkplaceRequest request)
{
userSession.assertLoggedIn();
if (!userSession.isWorkplacesEnabled())
{
throw new AdempiereException("Workplaces not enabled");
}
workplaceService.assignWorkplace(WorkplaceAssignment... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\session\UserSessionRestController.java | 1 |
请完成以下Java代码 | private void fireAdditionListener(final K key, final V value)
{
logger.debug("fireAdditionListener - Item added; key={}; value={}", key, value);
if (additionListener != null)
{
additionListener.itemAdded(key, value);
}
}
/**
* Add all key/value pairs to this cache.
*
* @param map key/value pairs
... | } // size
/**
* @see java.util.Map#values()
*/
public Collection<V> values()
{
return cache.asMap().values();
} // values
@Override
protected final void finalize() throws Throwable
{
// NOTE: to avoid memory leaks we need to programatically clear our internal state
try (final IAutoCloseable ign... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CCache.java | 1 |
请完成以下Java代码 | public Builder setIncludedViewLayout(final IncludedViewLayout includedViewLayout)
{
this.includedViewLayout = includedViewLayout;
return this;
}
public Builder clearViewCloseActions()
{
allowedViewCloseActions = new LinkedHashSet<>();
return this;
}
public Builder allowViewCloseAction(@NonNull... | }
public Builder setTreeCollapsible(final boolean treeCollapsible)
{
this.treeCollapsible = treeCollapsible;
return this;
}
public Builder setTreeExpandedDepth(final int treeExpandedDepth)
{
this.treeExpandedDepth = treeExpandedDepth;
return this;
}
public Builder setAllowOpeningRowDetails(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\ViewLayout.java | 1 |
请完成以下Java代码 | public final void closeAllGroups()
{
final GroupType exceptGroup = null; // no exception
closeAllGroupsExcept(exceptGroup);
}
/**
* Close all groups, but not the last used one. Last used one is considered that group where we added last item.
*/
public final void closeAllGroupExceptLastUsed()
{
closeAllG... | }
// Skip the excepted group
if (group == exceptGroup)
{
continue;
}
closeGroupAndCollect(group);
groups.remove();
}
}
/**
* @return how many groups were created
*/
public final int getGroupsCount()
{
return _countGroups;
}
/**
* @return how many items were added
*/
public f... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\MapReduceAggregator.java | 1 |
请完成以下Java代码 | public class EchoMultiServer {
private static final Logger LOG = LoggerFactory.getLogger(EchoMultiServer.class);
private ServerSocket serverSocket;
public void start(int port) {
try {
serverSocket = new ServerSocket(port);
while (true)
new EchoClientHandler... | while ((inputLine = in.readLine()) != null) {
if (".".equals(inputLine)) {
out.println("bye");
break;
}
out.println(inputLine);
}
in.close();
out.close();
... | repos\tutorials-master\core-java-modules\core-java-networking\src\main\java\com\baeldung\socket\EchoMultiServer.java | 1 |
请完成以下Java代码 | public void setTrxItemProcessorCtx(final ITrxItemProcessorContext processorCtx)
{
processor.setTrxItemProcessorCtx(processorCtx);
}
@Override
public RT getResult()
{
return processor.getResult();
}
@Override
public void process(final IT item) throws Exception
{
itemsPerBatch++;
processor.process(item... | @Override
public void newChunk(final IT item)
{
itemsPerBatch = 0;
processor.newChunk(item);
}
@Override
public void completeChunk()
{
processor.completeChunk();
}
@Override
public void cancelChunk()
{
processor.cancelChunk();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\processor\api\impl\FixedBatchTrxItemProcessor.java | 1 |
请完成以下Java代码 | public Stat exists(String path, Watcher watcher) {
try {
return zkClient.exists(path, watcher);
} catch (Exception e) {
log.error("【node exception】{},{}", path, e);
return null;
}
}
/**
* create persist node
*
* @param path
* @par... | public boolean deleteNode(String path) {
try {
//The version parameter specifies the version of the data to be updated. If the version is different from the real version, the update operation will fail. Specify version as -1 to ignore the version check.
zkClient.delete(path, -1);
... | repos\springboot-demo-master\zookeeper\src\main\java\com\et\zookeeper\api\ZkApi.java | 1 |
请完成以下Java代码 | public void setRestTemplate(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
@Nullable
public URI getUrl() {
return url;
}
public void setUrl(@Nullable URI url) {
this.url = url;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.use... | }
public void setRoom(@Nullable String room) {
this.room = room;
}
@Nullable
public String getToken() {
return token;
}
public void setToken(@Nullable String token) {
this.token = token;
}
} | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\LetsChatNotifier.java | 1 |
请完成以下Java代码 | public HistoryEvent createCaseActivityInstanceEndEvt(DelegateCaseExecution caseExecution) {
final CaseExecutionEntity caseExecutionEntity = (CaseExecutionEntity) caseExecution;
// create event instance
HistoricCaseActivityInstanceEventEntity evt = loadCaseActivityInstanceEventEntity(caseExecutionEntity);
... | }
protected void initCaseActivityInstanceEvent(HistoricCaseActivityInstanceEventEntity evt, CaseExecutionEntity caseExecutionEntity, HistoryEventTypes eventType) {
evt.setId(caseExecutionEntity.getId());
evt.setParentCaseActivityInstanceId(caseExecutionEntity.getParentId());
evt.setEventType(eventType.ge... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\DefaultCmmnHistoryEventProducer.java | 1 |
请完成以下Java代码 | private String createElasticJsonRecord(AuditLog auditLog) {
ObjectNode auditLogNode = JacksonUtil.newObjectNode();
auditLogNode.put("postDate", LocalDateTime.now().toString());
auditLogNode.put("id", auditLog.getId().getId().toString());
auditLogNode.put("entityName", auditLog.getEntityN... | @Override
public void onSuccess(Response response) {
log.trace("Elasticsearch sink log action method succeeded. Response result [{}]!", response);
}
@Override
public void onFailure(Exception exception) {
log.warn("Elasticsearch sink log action method failed!", ex... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\audit\sink\ElasticsearchAuditLogSink.java | 1 |
请完成以下Java代码 | public String getDisplayName()
{
return inOut.getDocumentNo();
}
@Override
public List<IHUDocumentLine> getLines()
{
return lines;
}
private MInOutHUDocument reversal = null;
@Override
public MInOutHUDocument getReversal() | {
if (reversal == null)
{
reversal = new MInOutHUDocument(inOut.getReversal(), getReversalLines());
reversal.setReversal(this);
}
return reversal;
}
private void setReversal(final MInOutHUDocument reversal)
{
this.reversal = reversal;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\impl\MInOutHUDocument.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class OnMetricsExportEnabledCondition extends SpringBootCondition {
private static final String PROPERTY_TEMPLATE = "management.%s.metrics.export.enabled";
private static final String DEFAULT_PROPERTY_NAME = "management.defaults.metrics.export.enabled";
@Override
public ConditionOutcome getMatchOutcome(Condition... | }
/**
* Return the default outcome that should be used if property is not set. By default
* this method will use the {@link #DEFAULT_PROPERTY_NAME} property, matching if it is
* {@code true} or if it is not configured.
* @param context the condition context
* @return the default outcome
*/
private Condit... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\OnMetricsExportEnabledCondition.java | 2 |
请完成以下Java代码 | public static void ensureNotDocumentRootExpression(String expression) {
if (ROOT_EXPRESSION.equals(expression)) {
throw LOG.notAllowedXPathExpression(expression);
}
}
/**
* Ensure that the node is not null.
*
* @param node the node to ensure to be not null
* @param expression the expressi... | /**
* Ensure that the nodeList is either null or empty.
*
* @param nodeList the nodeList to ensure to be either null or empty
* @param expression the expression was used to fine the nodeList
* @throws SpinXPathException if the nodeList is either null or empty
*/
public static void ensureXPathNotEmpt... | repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\util\DomXmlEnsure.java | 1 |
请完成以下Java代码 | public int getM_Shipper_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Shipper_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setP... | }
@Override
public java.lang.String getShipperGateway()
{
return get_ValueAsString(COLUMNNAME_ShipperGateway);
}
@Override
public void setTrackingURL (final @Nullable java.lang.String TrackingURL)
{
set_Value (COLUMNNAME_TrackingURL, TrackingURL);
}
@Override
public java.lang.String getTrackingURL()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipper.java | 1 |
请完成以下Java代码 | public void updatePartitionerInterceptorOnChange(final I_DLM_Partition_Config_Line configLine)
{
if (configLine.getDLM_Referencing_Table_ID() <= 0)
{
return;
}
final ModelValidationEngine engine = ModelValidationEngine.get();
final I_DLM_Partition_Config_Line oldConfigLine = InterfaceWrapperHelper.create... | }
final ModelValidationEngine engine = ModelValidationEngine.get();
engine.addModelChange(configLine.getDLM_Referencing_Table().getTableName(), AddToPartitionInterceptor.INSTANCE);
}
@ModelChange(timings = ModelValidator.TYPE_AFTER_DELETE)
public void updatePartitionerInterceptorOnDelete(final I_DLM_Partition_... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\model\interceptor\DLM_Partition_Config_Line.java | 1 |
请完成以下Java代码 | public int getC_ConversionType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_ConversionType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLU... | return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Suchschlüssel.
@param Value
Search key for the record in the format required - must be unique
*/
@Override
public void setValue (java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Suchschlüssel.
@return Search key ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ConversionType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class ArticleModel {
ArticleModelNested article;
static ArticleModel fromArticle(Article article) {
return new ArticleModel(ArticleModelNested.fromArticle(article));
}
@Value
static class ArticleModelNested {
String slug;
String title;
String description;
S... | static ArticleModelNested fromArticle(Article article) {
final var contents = article.getContents();
final var titleFromArticle = contents.getTitle();
return new ArticleModelNested(
titleFromArticle.getSlug(), titleFromArticle.getTitle(),
conte... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\application\article\ArticleModel.java | 2 |
请完成以下Java代码 | public class FunctionalJavaMain {
public static final F<Integer, Boolean> isEven = i -> i % 2 == 0;
public static void main(String[] args) {
List<Integer> fList = List.list(3, 4, 5, 6);
List<Boolean> evenList = fList.map(isEven);
Show.listShow(Show.booleanShow).println(evenList);
... | System.out.println(sum);
Option<Integer> n1 = Option.some(1);
Option<Integer> n2 = Option.some(2);
F<Integer, Option<Integer>> f1 = i -> i % 2 == 0 ? Option.some(i + 100) : Option.none();
Option<Integer> result1 = n1.bind(f1);
Option<Integer> result2 = n2.bind(f1);
Sh... | repos\tutorials-master\libraries-6\src\main\java\com\baeldung\fj\FunctionalJavaMain.java | 1 |
请完成以下Java代码 | public void onBeforeInvoiceComplete(final I_C_Invoice invoice, final List<I_C_Invoice_Candidate> fromCandidates)
{
final boolean isEdiEnabled = calculateEdiEnabled(fromCandidates);
final de.metas.edi.model.I_C_Invoice ediInvoice = InterfaceWrapperHelper.create(invoice, de.metas.edi.model.I_C_Invoice.class);
/... | }
final boolean isEdiEnabled = InterfaceWrapperHelper.create(fromCandidates.get(0), de.metas.edi.model.I_C_Invoice_Candidate.class).isEdiEnabled();
for (int i = 0; i < fromCandidates.size(); i++)
{
final de.metas.edi.model.I_C_Invoice_Candidate candidate = InterfaceWrapperHelper.create(fromCandidates.get(i), ... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\spi\impl\EdiInvoiceCandidateListener.java | 1 |
请完成以下Java代码 | public int size()
{
return this.size;
}
public int getLinearExpandFactor()
{
return this.linearExpandFactor;
}
public void set(int index, int value)
{
this.data[index] = value;
}
public int get(int index)
{
return this.data[index];
}
pu... | linearExpandFactor = byteArray.nextInt();
exponentialExpanding = byteArray.nextBoolean();
exponentialExpandFactor = byteArray.nextDouble();
return true;
}
private void writeObject(ObjectOutputStream out) throws IOException
{
loseWeight();
out.writeInt(size);
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\datrie\IntArrayList.java | 1 |
请完成以下Java代码 | public int dimension()
{
return wordVectorModel.dimension();
}
/**
* 文档相似度计算
*
* @param what
* @param with
* @return
*/
public float similarity(String what, String with)
{
Vector A = query(what);
if (A == null) return -1f;
Vector B = que... | /**
* 是否激活了停用词过滤器
*
* @return
*/
public boolean isFilterEnabled()
{
return filter;
}
/**
* 激活/关闭停用词过滤器
*
* @param filter
*/
public void enableFilter(boolean filter)
{
this.filter = filter;
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\DocVectorModel.java | 1 |
请完成以下Java代码 | public int getM_Warehouse_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID);
}
@Override
public void setPrintServiceName (java.lang.String PrintServiceName)
{
set_ValueNoCheck (COLUMNNAME_PrintServiceName, PrintServiceName);
}
@Override
public java.lang.String getPrintServiceName()
{
return (ja... | @Override
public void setTrayNumber (int TrayNumber)
{
set_ValueNoCheck (COLUMNNAME_TrayNumber, Integer.valueOf(TrayNumber));
}
@Override
public int getTrayNumber()
{
return get_ValueAsInt(COLUMNNAME_TrayNumber);
}
@Override
public void setWP_IsError (boolean WP_IsError)
{
set_ValueNoCheck (COLUMNNAM... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Order_MFGWarehouse_Report_PrintInfo_v.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static boolean hasAttribute(
@NonNull final Node node,
@NonNull final String attributeName,
@NonNull final String matchingValue)
{
final NamedNodeMap namedNodeMap = node.getAttributes();
final Node attributeNode = namedNodeMap.getNamedItem(attributeName);
if (attributeNode == null || attributeNo... | @NonNull
public static String addXMLDeclarationIfNeeded(@NonNull final String payload)
{
if (payload.trim().startsWith("<?xml")) {
// Payload already contains XML declaration
return payload;
}
final String xmlDeclaration = String.format(
"<?xml version=\"1.0\" encoding=\"%s\" standalone=\"%s\"?>\n",
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-leichundmehl\src\main\java\de\metas\camel\externalsystems\leichundmehl\to_leichundmehl\util\XMLUtil.java | 2 |
请完成以下Java代码 | protected void executeInternal(CommandContext commandContext, ExecutionEntity executionEntity) {
SuspensionStateUtil.setSuspensionState(executionEntity, getNewState());
commandContext.getExecutionEntityManager().update(executionEntity, false);
updateChildrenSuspensionState(commandContext);
... | }
protected void updateChildrenSuspensionState(CommandContext commandContext) {
Collection<ExecutionEntity> childExecutions = commandContext
.getExecutionEntityManager()
.findChildExecutionsByProcessInstanceId(processInstanceId);
for (ExecutionEntity childExecution : childEx... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\AbstractSetProcessInstanceStateCmd.java | 1 |
请完成以下Java代码 | protected boolean isMultiRelease() {
Boolean multiRelease = this.multiRelease;
if (multiRelease == null) {
synchronized (this.archiveLock) {
multiRelease = this.multiRelease;
if (multiRelease == null) {
// JarFile.isMultiRelease() is final so we must go to the manifest
Manifest manifest = getMa... | }
this.archive = null;
this.archiveEntries = null;
}
}
}
private JarURLConnection connect() throws IOException {
URLConnection connection = this.url.openConnection();
ResourceUtils.useCachesIfNecessary(connection);
Assert.state(connection instanceof JarURLConnection,
() -> "URL '%s' did not re... | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\servlet\NestedJarResourceSet.java | 1 |
请完成以下Java代码 | public boolean isWarning() {
return isWarning;
}
public void setWarning(boolean isWarning) {
this.isWarning = isWarning;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public Map<String, String> getParams() ... | if (extraInfoAlreadyPresent) {
strb.append(" | ");
}
strb.append("id = " + activityId + " | ");
extraInfoAlreadyPresent = true;
}
if (activityName != null) {
if (extraInfoAlreadyPresent) {
strb.append(" | ");
}
... | repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\ValidationError.java | 1 |
请完成以下Java代码 | public class Util {
public static Hashtable HTMLColors;
static {
HTMLColors = new Hashtable();
HTMLColors.put("red", Color.red);
HTMLColors.put("green", Color.green);
HTMLColors.put("blue", Color.blue);
HTMLColors.put("cyan", Color.cyan);
HTMLColors.put("mage... | ex.printStackTrace();
}
}
else return defaultColor;
return getColorForName(color, defaultColor);
}
public static String encodeColor(Color color) {
return "#"+Integer.toHexString(color.getRGB()-0xFF000000).toUpperCase();
}
public static Color decodeCol... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\Util.java | 1 |
请完成以下Java代码 | protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Printer[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Sys... | public void setPrinterName (String PrinterName)
{
set_Value (COLUMNNAME_PrinterName, PrinterName);
}
/** Get Drucker.
@return Name of the Printer
*/
public String getPrinterName ()
{
return (String)get_Value(COLUMNNAME_PrinterName);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\adempiere\model\X_AD_Printer.java | 1 |
请完成以下Java代码 | public class M_ShipmentSchedule_Set_BestBeforeDate extends JavaProcess implements IProcessPrecondition
{
@Param(mandatory = true, parameterName = "BestBeforeDate")
private LocalDate p_bestBeforeDate;
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final IShipmentScheduleBL shipmentScheduleB... | final IQueryFilter<I_M_ShipmentSchedule> queryFilter = getProcessInfo().getQueryFilterOrElse(ConstantQueryFilter.of(false));
final ShipmentScheduleUserChangeRequestBuilder builder = ShipmentScheduleUserChangeRequest.builder().bestBeforeDate(p_bestBeforeDate);
final IQueryFilter<I_M_ShipmentSchedule> notLockedFilte... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\process\M_ShipmentSchedule_Set_BestBeforeDate.java | 1 |
请完成以下Java代码 | private boolean checkContextVariableResolved(@NonNull final ContextPath path, @NonNull final String contextVariable)
{
final ContextVariables contextVariables = getCurrentContextVariables();
final boolean isFound = contextVariables.contains(contextVariable);
missingContextVariables.recordContextVariableUsed(path... | {
final AdempiereException wrappedException = AdempiereException.wrapIfNeeded(exception);
fillContextInfo(wrappedException);
return wrappedException;
}
private void fillContextInfo(final AdempiereException exception)
{
exception.setParameter("contextPath", getCurrentPath());
final ContextVariables contex... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ContextVariablesCheckCommand.java | 1 |
请完成以下Java代码 | public static Optional<LicenseFeeConfig> castOrEmpty(@NonNull final CommissionConfig commissionConfig)
{
if (isInstance(commissionConfig))
{
return Optional.of((LicenseFeeConfig)commissionConfig);
}
return Optional.empty();
}
@Override
public CommissionType getCommissionType()
{
return CommissionType... | @Nullable
public CommissionContract getContractFor(@NonNull final BPartnerId contractualBPartnerId)
{
if (licenseFeeContract.getContractOwnerBPartnerId().equals(contractualBPartnerId))
{
return licenseFeeContract;
}
return null;
}
@NonNull
public LicenseFeeSettingsId getId()
{
return licenseFeeSetti... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\licensefee\algorithm\LicenseFeeConfig.java | 1 |
请完成以下Java代码 | public class CustomInterval extends BaseAggInterval {
@NotNull
@Min(1)
private Long durationSec;
public CustomInterval(String tz, Long offsetSec, Long durationSec) {
super(tz, offsetSec);
this.durationSec = durationSec;
}
@Override
public AggIntervalType getType() {
... | @Override
protected ZonedDateTime alignToIntervalStart(ZonedDateTime reference) {
ZonedDateTime localMidnight = reference.toLocalDate().atStartOfDay(reference.getZone());
long secondsFromMidnight = Duration.between(localMidnight, reference).getSeconds();
long alignedSecondsFromMidnight = (se... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\cf\configuration\aggregation\single\interval\CustomInterval.java | 1 |
请完成以下Java代码 | public Execution executeActivityInAdhocSubProcess(String executionId, String activityId) {
return commandExecutor.execute(new ExecuteActivityForAdhocSubProcessCmd(executionId, activityId));
}
@Override
public void completeAdhocSubProcess(String executionId) {
commandExecutor.execute(new Com... | } else if (processInstanceBuilder.getMessageName() != null) {
return commandExecutor.execute(new StartProcessInstanceByMessageCmd(processInstanceBuilder));
} else {
throw new ActivitiIllegalArgumentException(
"No processDefinitionId, processDefinitionKey nor messageName p... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\RuntimeServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | Stream<BPartnerLocationId> streamBPartnerLocationIds(
@Nullable final Set<OrgId> onlyOrgIds,
@Nullable final String glnLookupLabel)
{
return locations.stream()
.filter(location -> location.isMatching(onlyOrgIds, glnLookupLabel))
.map(GLNLocation::getBpLocationId);
}
}
@Value
@Builder
priva... | {
if (Check.isBlank(glnLookupLabel))
{
return true;
}
return glnLookupLabel.equals(glnWithLabel.getLabel());
}
private boolean isMatchingOrgId(@Nullable final Set<OrgId> onlyOrgIds)
{
if (onlyOrgIds == null || onlyOrgIds.isEmpty())
{
return true;
}
return onlyOrgIds.contains(orgId... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\GLNLoadingCache.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class BatchWindowConfiguration {
protected final static ConfigurationLogger LOG = ConfigurationLogger.CONFIG_LOGGER;
private String startTime;
private Date startTimeAsDate;
private String endTime = "00:00";
private Date endTimeAsDate;
public BatchWindowConfiguration() {
}
public BatchWindo... | }
public Date getStartTimeAsDate() {
return startTimeAsDate;
}
public Date getEndTimeAsDate() {
return endTimeAsDate;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
BatchWindowConfigurat... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\BatchWindowConfiguration.java | 2 |
请完成以下Java代码 | default Map<String, Object> getClaimAsMap(String claim) {
if (!hasClaim(claim)) {
return null;
}
final TypeDescriptor sourceDescriptor = TypeDescriptor.valueOf(Object.class);
final TypeDescriptor targetDescriptor = TypeDescriptor.map(Map.class, TypeDescriptor.valueOf(String.class),
TypeDescriptor.valueOf... | * @throws NullPointerException if the claim value is {@code null}
*/
@SuppressWarnings("unchecked")
default List<String> getClaimAsStringList(String claim) {
if (!hasClaim(claim)) {
return null;
}
final TypeDescriptor sourceDescriptor = TypeDescriptor.valueOf(Object.class);
final TypeDescriptor targetDes... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\ClaimAccessor.java | 1 |
请完成以下Java代码 | public EventSubscriptionDto getEventSubscription() {
RuntimeService runtimeService = engine.getRuntimeService();
EventSubscription eventSubscription = runtimeService.createEventSubscriptionQuery()
.executionId(executionId).eventName(messageName).eventType(MESSAGE_EVENT_TYPE).singleResult();
if (eve... | } catch (AuthorizationException e) {
throw e;
} catch (ProcessEngineException e) {
throw new RestException(Status.INTERNAL_SERVER_ERROR, e, String.format("Cannot trigger message %s for execution %s: %s",
messageName, executionId, e.getMessage()));
} catch (RestException e) {
String er... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\runtime\impl\MessageEventSubscriptionResource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private HuId createHU(@NonNull final IHUContext huContext)
{
final I_C_UOM productStockingUOM = productBL.getStockUOM(productId);
// final I_M_InOut referenceModel = getCustomerReturns(); // using customer returns just because we need to use a referenced model
final I_AD_PInstance referencedModel = Services.get(... | {
vhuAttributes.setValue(AttributeConstants.WarrantyStartDate, warrantyStartDate);
}
vhuAttributes.saveChangesIfNeeded();
return HuId.ofRepoId(vhu.getM_HU_ID());
}
private LocatorId getLocatorId()
{
final I_M_InOut customerReturns = getCustomerReturns();
final WarehouseId warehouseId = WarehouseId.ofR... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\customerreturns\process\HUsToReturn_CreateShippedHU.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class PayScheduleId implements RepoIdAware
{
int repoId;
private PayScheduleId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_PaySchedule_ID");
}
@JsonCreator
public static PayScheduleId ofRepoId(final int payScheduleId)
{
return new PayScheduleId(payScheduleId);
}
@Null... | public static Optional<PayScheduleId> optionalOfRepoId(@Nullable final Integer payScheduleId)
{
return Optional.ofNullable(ofRepoIdOrNull(payScheduleId));
}
@JsonValue
@Override
public int getRepoId()
{
return repoId;
}
public static int toRepoId(@Nullable final PayScheduleId payScheduleId)
{
return pa... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\paymentterm\PayScheduleId.java | 2 |
请完成以下Java代码 | public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public static HistoricDecisionInstanceDto fromHistoricDecisionInstance(HistoricDecisionInstance historicDecisionInstance) {
HistoricDecisionInstanceDto dto = new HistoricDecisionInstan... | inputs.add(inputDto);
}
dto.inputs = inputs;
}
catch (ProcessEngineException e) {
// no inputs fetched
}
try {
List<HistoricDecisionOutputInstanceDto> outputs = new ArrayList<HistoricDecisionOutputInstanceDto>();
for (HistoricDecisionOutputInstance output : historicDecisio... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricDecisionInstanceDto.java | 1 |
请完成以下Java代码 | static String buildContactName(@Nullable final String firstName, @Nullable final String lastName)
{
final StringBuilder contactName = new StringBuilder();
if (lastName != null && !Check.isBlank(lastName))
{
contactName.append(lastName.trim());
}
if (firstName != null && !Check.isBlank(firstName))
{
... | * Is the email valid
*
* @return return true if email is valid (artificial check)
*/
boolean isEMailValid(I_AD_User user);
Language getUserLanguage(@NonNull UserId userId);
/**
* @return the user's language or fallbacks; never returns {@code null}.
*/
Language getUserLanguage(I_AD_User userRecord);
Us... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\api\IUserBL.java | 1 |
请完成以下Java代码 | public class CompactArray implements Serializable
{
float[] array;
int offset;
public CompactArray(int offset, float[] array)
{
this.offset = offset;
this.array = array;
}
/**
* 将index处的元素设置为value
*
* @param index
* @param value
*/
public void set(i... | else
{
int gap = index - (array.length + offset - 1);
int newSize = array.length + gap;
float[] newArray = new float[newSize];
newArray[newSize - 1] = value;
for (int i = 0; i < array.length; i++)
{
newArray[i] = array[i];
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\structures\CompactArray.java | 1 |
请完成以下Java代码 | public class X_M_DosageForm extends org.compiere.model.PO implements I_M_DosageForm, org.compiere.model.I_Persistent
{
/**
*
*/
private static final long serialVersionUID = 1350345018L;
/** Standard Constructor */
public X_M_DosageForm (Properties ctx, int M_DosageForm_ID, String trxName)
{
s... | {
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
/** Set Dosage Form.
@param M_DosageForm_ID Dosage Form */
@Override
public void setM_DosageForm_ID (int M_DosageForm_ID)
{
if (M_DosageForm_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_DosageForm_ID, null);
else
set_ValueNoCheck (COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java-gen\de\metas\vertical\pharma\model\X_M_DosageForm.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MetricsRepositoryMethodInvocationListener implements RepositoryMethodInvocationListener {
private final SingletonSupplier<MeterRegistry> registrySupplier;
private final RepositoryTagsProvider tagsProvider;
private final String metricName;
private final AutoTimer autoTimer;
/**
* Create a new {@... | public void afterInvocation(RepositoryMethodInvocation invocation) {
Set<Timed> annotations = TimedAnnotations.get(invocation.getMethod(), invocation.getRepositoryInterface());
Iterable<Tag> tags = this.tagsProvider.repositoryTags(invocation);
long duration = invocation.getDuration(TimeUnit.NANOSECONDS);
AutoTi... | repos\spring-boot-4.0.1\module\spring-boot-data-commons\src\main\java\org\springframework\boot\data\metrics\MetricsRepositoryMethodInvocationListener.java | 2 |
请完成以下Java代码 | public class ConditionUtil {
public static boolean hasTrueCondition(SequenceFlow sequenceFlow, DelegateExecution execution) {
String conditionExpression = null;
if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) {
ObjectNode elementProperties = Context.get... | }
}
protected static String getActiveValue(String originalValue, String propertyName, ObjectNode elementProperties) {
String activeValue = originalValue;
if (elementProperties != null) {
JsonNode overrideValueNode = elementProperties.get(propertyName);
if (overrideValueN... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\condition\ConditionUtil.java | 1 |
请完成以下Java代码 | int getExitCode() {
int exitCode = 0;
for (ExitCodeGenerator generator : this.generators) {
try {
int value = generator.getExitCode();
if (value != 0) {
exitCode = value;
break;
}
}
catch (Exception ex) {
exitCode = 1;
ex.printStackTrace();
}
}
return exitCode;
}
/**... | */
private static class MappedExitCodeGenerator implements ExitCodeGenerator {
private final Throwable exception;
private final ExitCodeExceptionMapper mapper;
MappedExitCodeGenerator(Throwable exception, ExitCodeExceptionMapper mapper) {
this.exception = exception;
this.mapper = mapper;
}
@Overrid... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ExitCodeGenerators.java | 1 |
请完成以下Java代码 | public class EngineRestExceptionDto {
protected String message;
protected String type;
protected Integer code;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getType() {
return type;
}
public void setTy... | this.type = type;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public RestException toRestException() {
return new RestException(message, type, code);
}
} | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\EngineRestExceptionDto.java | 1 |
请完成以下Java代码 | public <T> IQueryBuilder<T> getLockedRecordsQueryBuilder(final Class<T> modelClass, final Object contextProvider)
{
return getLockDatabase().getLockedRecordsQueryBuilder(modelClass, contextProvider);
}
@Override
public int removeAutoCleanupLocks()
{
return getLockDatabase().removeAutoCleanupLocks();
}
@Ove... | public <T> IQuery<T> addNotLockedClause(final IQuery<T> query)
{
return getLockDatabase().addNotLockedClause(query);
}
@Override
public ExistingLockInfo getLockInfo(final TableRecordReference tableRecordReference, final LockOwner lockOwner)
{
return getLockDatabase().getLockInfo(tableRecordReference, lockOwne... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\LockManager.java | 1 |
请完成以下Java代码 | public class CompleteTaskPayload implements Payload {
private String id;
private String taskId;
private Map<String, Object> variables;
public CompleteTaskPayload() {
this.id = UUID.randomUUID().toString();
}
public CompleteTaskPayload(String taskId, Map<String, Object> variables) {
... | return id;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public Map<String, Object> getVariables() {
return variables;
}
public void setVariables(Map<String, Object> variables) {
this.vari... | repos\Activiti-develop\activiti-api\activiti-api-task-model\src\main\java\org\activiti\api\task\model\payloads\CompleteTaskPayload.java | 1 |
请完成以下Java代码 | public int size()
{
return getAllStrings().size();
}
@Override
public boolean isEmpty()
{
return this.equivalenceClassMDAGNodeHashMap.size() != 0;
}
@Override
public boolean contains(Object o)
{
if (o.getClass() != String.class) return false;
return ... | }
@Override
public boolean addAll(Collection<? extends String> c)
{
boolean modified = false;
for (String e : c)
if (add(e))
modified = true;
return modified;
}
@Override
public boolean retainAll(Collection<?> c)
{
boolean modifie... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\MDAG\MDAGSet.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private boolean productMatchesSchemaLine(final int productId, final I_M_DiscountSchemaLine schemaLine)
{
final IProductDAO productDAO = Services.get(IProductDAO.class);
final boolean sameProduct = schemaLine.getM_Product_ID() == productId;
if (sameProduct)
{
return true;
}
final boolean differentProd... | .addOnlyActiveRecordsFilter()
.addEqualsFilter(I_C_BPartner.COLUMNNAME_IsCustomer, true)
.addEqualsFilter(I_C_BPartner.COLUMNNAME_IsAllowPriceMutation, true)
.create();
final List<I_M_PriceList_Version> customerVersions = queryBL.createQueryBuilder(I_M_PriceList.class)
.addEqualsFilter(I_M_PriceList.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PlainPriceListDAO.java | 2 |
请完成以下Java代码 | public static <T> CommonPage<T> restPage(List<T> list) {
CommonPage<T> result = new CommonPage<T>();
PageInfo<T> pageInfo = new PageInfo<T>(list);
result.setTotalPage(pageInfo.getPages());
result.setPageNum(pageInfo.getPageNum());
result.setPageSize(pageInfo.getPageSize());
... | }
public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage;
}
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
public Long getTotal() {
return total;
}
public void setTotal(Long tota... | repos\mall-master\mall-common\src\main\java\com\macro\mall\common\api\CommonPage.java | 1 |
请完成以下Java代码 | default Timer.Builder builder(String name) {
return builder(() -> Timer.builder(name));
}
/**
* Factory method to create a new {@link Builder Timer.Builder} with auto-timer
* settings {@link #apply(Timer.Builder) applied}.
* @param supplier the builder supplier
* @return a new builder instance with auto-se... | */
void apply(Timer.Builder builder);
static void apply(@Nullable AutoTimer autoTimer, String metricName, Set<Timed> annotations,
Consumer<Timer.Builder> action) {
if (!CollectionUtils.isEmpty(annotations)) {
for (Timed annotation : annotations) {
action.accept(Timer.builder(annotation, metricName));
... | repos\spring-boot-4.0.1\module\spring-boot-data-commons\src\main\java\org\springframework\boot\data\metrics\AutoTimer.java | 1 |
请完成以下Java代码 | private final void hideGlassPane()
{
final MetasfreshGlassPane glassPane = this.glassPane;
this.glassPane = null;
if (glassPane == null)
{
return;
}
glassPane.setBusyTimer(0);
glassPane.setVisible(glassPaneVisibleOld);
glassPane.setMessagePlain(glassPaneMessageOld);
}
};
... | {
comp = (Component)rootPaneContainer;
}
else
{
comp = rootPaneContainer.getRootPane();
}
final Window window = AEnv.getParentComponent(comp, Window.class);
if (window == null)
{
final String errmsg = "No " + Window.class + " found."
+ "Ignore, but please check because this could be a devel... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\adempiere\form\swing\SwingClientUIInvoker.java | 1 |
请完成以下Java代码 | public LocalDate getLocalDate() {
return localDate;
}
public void setLocalDate(LocalDate localDate) {
this.localDate = localDate;
}
public LocalTime getLocalTime() {
return localTimeField;
}
public void setLocalTime(LocalTime localTime) {
this.localTimeField = ... | public void setLocalDateTime(LocalDateTime localDateTime) {
this.localDateTime = localDateTime;
}
public OffsetDateTime getOffsetDateTime() {
return offsetDateTime;
}
public void setOffsetDateTime(OffsetDateTime offsetDateTime) {
this.offsetDateTime = offsetDateTime;
}
... | repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\hibernate\pojo\TemporalValues.java | 1 |
请完成以下Java代码 | public Builder setAD_Table_ID(final int adTableId)
{
this.adTableId = adTableId;
return this;
}
private int getAD_Table_ID()
{
Check.assumeNotNull(adTableId, "adTableId not null");
Check.assume(adTableId > 0, "adTableId > 0");
return adTableId;
}
public Builder setAD_User_ID(final int adUse... | Check.assumeNotNull(adUserId, "Parameter adUserId is not null");
return adUserId;
}
public Builder setColumnDisplayTypeProvider(@NonNull final ColumnDisplayTypeProvider columnDisplayTypeProvider)
{
this.columnDisplayTypeProvider = columnDisplayTypeProvider;
return this;
}
public ColumnDisplayTypePr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\apps\search\UserQueryRepository.java | 1 |
请完成以下Java代码 | public void requestFocus()
{
m_curGC.requestFocus();
}
@Override
public boolean requestFocusInWindow()
{
return m_curGC.requestFocusInWindow();
}
public GridController getCurrentGridController()
{
return this.m_curGC;
}
public final AppsAction getIgnoreAction()
{
return aIgnore;
}
public final ... | final InputMap thisInputMap = this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
for (final KeyStroke key : thisInputMap.allKeys())
{
// Check if the component has a key binding defined for our panel key binding.
final Object compAction = compInputMap.get(key);
if (compAction == null)
{
continue;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\APanel.java | 1 |
请完成以下Java代码 | public String toString()
{
final int requestsCount = requests.size();
return MoreObjects.toStringHelper(this)
.omitNullValues()
.add("requestsCount", requestsCount)
.add("requests", requestsCount > 0 ? requests : null)
.toString();
}
public boolean isResetAll()
{
return requests.stream().anyM... | .map(CacheInvalidateRequest::getTableNameEffective)
.collect(ImmutableSet.toImmutableSet());
}
public TableRecordReferenceSet getRecordsEffective()
{
return requests.stream()
.map(CacheInvalidateRequest::getRecordEffective)
.collect(TableRecordReferenceSet.collect());
}
public TableRecordReferenceS... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\CacheInvalidateMultiRequest.java | 1 |
请完成以下Java代码 | protected void initMetricsCollectionTask() {
metricsCollectionTask = new MetricsCollectionTask(metricsRegistry, commandExecutor);
}
public void start() {
timer = new Timer("Camunda Metrics Reporter", true);
long reportingIntervalInMillis = reportingIntervalInSeconds * 1000;
timer.scheduleAtFixedRa... | }
public MetricsCollectionTask getMetricsCollectionTask() {
return metricsCollectionTask;
}
public void setMetricsCollectionTask(MetricsCollectionTask metricsCollectionTask) {
this.metricsCollectionTask = metricsCollectionTask;
}
public void setReporterId(String reporterId) {
this.reporterId = ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\reporter\DbMetricsReporter.java | 1 |
请完成以下Java代码 | public <T extends OAuth2AuthorizedClient> Mono<T> loadAuthorizedClient(String clientRegistrationId,
Authentication principal, ServerWebExchange exchange) {
if (this.isPrincipalAuthenticated(principal)) {
return this.authorizedClientService.loadAuthorizedClient(clientRegistrationId, principal.getName());
}
r... | @Override
public Mono<Void> removeAuthorizedClient(String clientRegistrationId, Authentication principal,
ServerWebExchange exchange) {
if (this.isPrincipalAuthenticated(principal)) {
return this.authorizedClientService.removeAuthorizedClient(clientRegistrationId, principal.getName());
}
return this.anonym... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\server\AuthenticatedPrincipalServerOAuth2AuthorizedClientRepository.java | 1 |
请完成以下Java代码 | protected void createValidCombinationIfNeeded(final I_C_ElementValue elementValue)
{
if (elementValue.isSummary())
{
return;
}
final AccountDimension.Builder accountDimensionTemplate = AccountDimension.builder()
//.setAcctSchemaId(acctSchema.getId())
.setC_ElementValue_ID(elementValue.getC_ElementV... | public static IAutoCloseable temporaryDisableUpdateTreeNode()
{
final boolean wasDisabled = updateTreeNodeDisabled.getAndSet(true);
return () -> updateTreeNodeDisabled.set(wasDisabled);
}
@ModelChange(timings = { ModelValidator.TYPE_AFTER_CHANGE }, ifColumnsChanged = { I_C_ElementValue.COLUMNNAME_Parent_ID, I_C... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\interceptor\C_ElementValue.java | 1 |
请完成以下Java代码 | public void setReplacementSource (final java.lang.String ReplacementSource)
{
set_Value (COLUMNNAME_ReplacementSource, ReplacementSource);
}
@Override
public java.lang.String getReplacementSource()
{
return get_ValueAsString(COLUMNNAME_ReplacementSource);
}
@Override
public void setReplaceRegExp (final @... | /**
* TargetFieldType AD_Reference_ID=541611
* Reference name: AttributeTypeList
*/
public static final int TARGETFIELDTYPE_AD_Reference_ID=541611;
/** textArea = textArea */
public static final String TARGETFIELDTYPE_TextArea = "textArea";
/** EAN13 = EAN13 */
public static final String TARGETFIELDTYPE_EAN... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_LeichMehl_PluFile_Config.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private class ApiStatsProxyCallback<T> implements TransportServiceCallback<T> {
private final TenantId tenantId;
private final CustomerId customerId;
private final int dataPoints;
private final TransportServiceCallback<T> callback;
public ApiStatsProxyCallback(TenantId tenantId,... | @Override
public ExecutorService getCallbackExecutor() {
return transportCallbackExecutor;
}
@Override
public boolean hasSession(TransportProtos.SessionInfoProto sessionInfo) {
return sessions.containsKey(toSessionId(sessionInfo));
}
@Override
public void createGaugeStats(S... | repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\service\DefaultTransportService.java | 2 |
请完成以下Java代码 | public class BatchJobDeclaration extends JobDeclaration<BatchJobContext, MessageEntity> {
public BatchJobDeclaration(String jobHandlerType) {
super(jobHandlerType);
}
@Override
protected ExecutionEntity resolveExecution(BatchJobContext context) {
return null;
}
@Override
protected MessageEntity... | @Override
public ParameterValueProvider getJobPriorityProvider() {
long batchJobPriority = Context.getProcessEngineConfiguration()
.getBatchJobPriority();
return new ConstantValueProvider(batchJobPriority);
}
@Override
public MessageEntity reconfigure(BatchJobContext context, MessageEntity job)... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchJobDeclaration.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.