instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public java.lang.String getHelp ()
{
return (java.lang.String)get_Value(COLUMNNAME_Help);
}
/** 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 identifi... | {
return (java.lang.String)get_Value(COLUMNNAME_RuleType);
}
/** Set Skript.
@param Script
Dynamic Java Language Script to calculate result
*/
@Override
public void setScript (java.lang.String Script)
{
set_Value (COLUMNNAME_Script, Script);
}
/** Get Skript.
@return Dynamic Java Language Script ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Rule.java | 1 |
请完成以下Java代码 | public static boolean sortDictionary(String path)
{
try
{
BufferedReader br = new BufferedReader(new InputStreamReader(IOUtil.newInputStream(path), "UTF-8"));
TreeMap<String, String> map = new TreeMap<String, String>();
String line;
while ((line = br.... | for (Map.Entry<String, String> entry : map.entrySet())
{
bw.write(entry.getValue());
bw.newLine();
}
bw.close();
}
catch (Exception e)
{
e.printStackTrace();
return false;
}
return true;
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\util\DictionaryUtil.java | 1 |
请完成以下Spring Boot application配置 | spring:
# datasource 数据源配置内容,对应 DataSourceProperties 配置属性类
datasource:
url: jdbc:mysql://127.0.0.1:43063/demo-68-authorization-server?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver- | class-name: com.mysql.jdbc.Driver
username: root # 数据库账号
password: 123456 # 数据库密码 | repos\SpringBoot-Labs-master\lab-68-spring-security-oauth\lab-68-demo11-authorization-server-by-jdbc-store\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO (Properties ctx)
{
org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
return poi;
}
/** Set Parzelle.
@param C_Allotment_ID Parzelle */
@Override
public void setC_Allotment_ID (int C_Allotment_ID)
... | @return Adresse oder Anschrift
*/
@Override
public int getC_Location_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Location_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
@Override
public void setName (java.l... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_C_Allotment.java | 1 |
请完成以下Java代码 | public void setC_RevenueRecognition_Run_ID (int C_RevenueRecognition_Run_ID)
{
if (C_RevenueRecognition_Run_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_Run_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_RevenueRecognition_Run_ID, Integer.valueOf(C_RevenueRecognition_Run_ID));
}
/** Get Rev... | /** Get Journal.
@return General Ledger Journal
*/
public int getGL_Journal_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_Journal_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Recognized Amount.
@param RecognizedAmt Recognized Amount */
public void setRecognizedAmt (Bi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RevenueRecognition_Run.java | 1 |
请完成以下Java代码 | public final class SessionsDescriptor implements OperationResponseBody {
private final List<SessionDescriptor> sessions;
public SessionsDescriptor(Map<String, ? extends Session> sessions) {
this.sessions = sessions.values().stream().map(SessionDescriptor::new).toList();
}
public List<SessionDescriptor> getSess... | public String getId() {
return this.id;
}
public Set<String> getAttributeNames() {
return this.attributeNames;
}
public Instant getCreationTime() {
return this.creationTime;
}
public Instant getLastAccessedTime() {
return this.lastAccessedTime;
}
public long getMaxInactiveInterval() {
... | repos\spring-boot-4.0.1\module\spring-boot-session\src\main\java\org\springframework\boot\session\actuate\endpoint\SessionsDescriptor.java | 1 |
请完成以下Java代码 | public final class MutableInt implements Comparable<MutableInt>, Serializable
{
public static MutableInt zero()
{
return new MutableInt(0);
}
private int value;
public MutableInt(final int value)
{
this.value = value;
}
@Override
public String toString()
{
return String.valueOf(value);
}
@Override... | public void add(final int valueToAdd)
{
value += valueToAdd;
}
public void increment()
{
value++;
}
public int incrementAndGet()
{
value++;
return value;
}
public int decrementAndGet()
{
value--;
return value;
}
public int incrementIf(final boolean condition)
{
if (condition)
{
value... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\MutableInt.java | 1 |
请完成以下Java代码 | public class NoUOMConversionException extends AdempiereException
{
private static final AdMessageKey MSG = AdMessageKey.of("NoUOMConversion");
public NoUOMConversionException(
@Nullable final ProductId productId,
@Nullable final UomId fromUomId,
@Nullable final UomId toUomId)
{
super(buildMessage(product... | return Services.get(IProductBL.class).getProductValueAndName(productId);
}
private static String extractUOMSymbol(@Nullable final UomId uomId)
{
if (uomId == null)
{
return "<none>";
}
try
{
final I_C_UOM uom = Services.get(IUOMDAO.class).getById(uomId);
if (uom == null)
{
return "<" + uo... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\exceptions\NoUOMConversionException.java | 1 |
请完成以下Java代码 | public boolean isSameCurrency ()
{
Object oo = get_Value(COLUMNNAME_IsSameCurrency);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Same Tax.
@param IsSameTax
Use the same tax as the main transaction
... | if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Charge.java | 1 |
请完成以下Java代码 | void reserve(int size)
{
if (size > _capacity)
{
resizeBuf(size);
}
}
private void resizeBuf(int size)
{
int capacity;
if (size >= _capacity * 2)
{
capacity = size;
}
else
{
capacity = 1;
... | {
capacity <<= 1;
}
}
int[] buf = new int[capacity];
if (_size > 0)
{
System.arraycopy(_buf, 0, buf, 0, _size);
}
_buf = buf;
_capacity = capacity;
}
private int[] _buf;
private int _size;
private int _capac... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\AutoIntPool.java | 1 |
请完成以下Java代码 | final class SpringProfileArbiter implements Arbiter {
private final @Nullable Environment environment;
private final Profiles profiles;
private SpringProfileArbiter(@Nullable Environment environment, String[] profiles) {
this.environment = environment;
this.profiles = Profiles.of(profiles);
}
@Override
pu... | * @param name the profile name or expression
* @return this
* @see Profiles#of(String...)
*/
public Builder setName(String name) {
this.name = name;
return this;
}
@Override
public SpringProfileArbiter build() {
Environment environment = Log4J2LoggingSystem.getEnvironment(this.loggerContext);... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\log4j2\SpringProfileArbiter.java | 1 |
请完成以下Java代码 | public void patchRow(final IEditableView.RowEditingContext ctx, final List<JSONDocumentChangedEvent> fieldChangeRequests)
{
final UnaryOperator<DataEntryDetailsRow> rowMapper = row -> {
final DataEntryDetailsRow.DataEntryDetailsRowBuilder builder = row.toBuilder();
for (final JSONDocumentChangedEvent fieldCh... | final List<DataEntryDetailsRow> newRows = loader.loadMatchingRows(loadFilter)
.stream()
// .map(newRow -> newRow) // we are just replacing the stale rows
.collect(ImmutableList.toImmutableList());
rowsHolder.compute(rows -> rows.replacingRows(rowIds, newRows));
}
private void saveAll()
{
final Map<... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\contract\flatrate\model\DataEntryDetailsRowsData.java | 1 |
请完成以下Java代码 | public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCardNumber() {
retu... | return expiryDate;
}
public void setExpiryDate(String expiryDate) {
this.expiryDate = expiryDate;
}
public CreditCard() {
}
@Override
public String toString() {
return "CreditCard{" + "id=" + id + ", cardNumber='" + cardNumber + '\'' + ", expiryDate='" + expiryDate + '\'' ... | repos\tutorials-master\persistence-modules\spring-data-jpa-query-2\src\main\java\com\baeldung\upsert\CreditCard.java | 1 |
请完成以下Java代码 | public IAllocationRequestBuilder setForceQtyAllocation(final Boolean forceQtyAllocation)
{
this.forceQtyAllocation = forceQtyAllocation;
return this;
}
private boolean isForceQtyAllocationToUse()
{
if (forceQtyAllocation != null)
{
return forceQtyAllocation;
}
else if (baseAllocationRequest != null)... | return this;
}
private boolean isDeleteEmptyAndJustCreatedAggregatedTUs()
{
if (deleteEmptyAndJustCreatedAggregatedTUs != null)
{
return deleteEmptyAndJustCreatedAggregatedTUs;
}
else if (baseAllocationRequest != null)
{
return baseAllocationRequest.isDeleteEmptyAndJustCreatedAggregatedTUs();
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AllocationRequestBuilder.java | 1 |
请完成以下Java代码 | public ShortcutType shortcutType() {
return GATHER_LIST;
}
@Override
public List<String> shortcutFieldOrder() {
return Collections.singletonList("sources");
}
@NotNull
private List<IpSubnetFilterRule> convert(List<String> values) {
List<IpSubnetFilterRule> sources = new ArrayList<>();
for (String arg : ... | private void addSource(List<IpSubnetFilterRule> sources, String source) {
if (!source.contains("/")) { // no netmask, add default
source = source + "/32";
}
String[] ipAddressCidrPrefix = source.split("/", 2);
String ipAddress = ipAddressCidrPrefix[0];
int cidrPrefix = Integer.parseInt(ipAddressCidrPrefix... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\RemoteAddrRoutePredicateFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable Integer getMaxQueueSize() {
return this.maxQueueSize;
}
public void setMaxQueueSize(@Nullable Integer maxQueueSize) {
this.maxQueueSize = maxQueueSize;
}
public @Nullable Integer getMaxConcurrentRequests() {
return this.maxConcurrentRequests;
}
public void setMaxConcurrentReques... | * Requires org.xerial.snappy:snappy-java.
*/
SNAPPY,
/**
* No compression.
*/
NONE
}
public enum ThrottlerType {
/**
* Limit the number of requests that can be executed in parallel.
*/
CONCURRENCY_LIMITING("ConcurrencyLimitingRequestThrottler"),
/**
* Limits the request rate per sec... | repos\spring-boot-4.0.1\module\spring-boot-cassandra\src\main\java\org\springframework\boot\cassandra\autoconfigure\CassandraProperties.java | 2 |
请完成以下Java代码 | public Timestamp getParameterAsTimestamp(final String parameterName)
{
return null;
}
@Override
public LocalDate getParameterAsLocalDate(final String parameterName)
{
return null;
}
@Override
public ZonedDateTime getParameterAsZonedDateTime(final String parameterName)
{
return null;
}
@Nullable
@Ov... | {
return null;
}
/**
* Returns an empty list.
*/
@Override
public Collection<String> getParameterNames()
{
return ImmutableList.of();
}
@Override
public <T extends Enum<T>> Optional<T> getParameterAsEnum(final String parameterName, final Class<T> enumType)
{
return Optional.empty();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\NullParams.java | 1 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.get... | return false;
return true;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
+ ", revision=" + revision
+ ", lockOwner=" + lockOwner
+ ", lockExpirationTime=" + lockExpirationTime
+ ", duedate=" + duedate
+ ", rootP... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AcquirableJobEntity.java | 1 |
请完成以下Java代码 | public BigDecimal getTaxTotalAmt()
{
return isAccountSignDR() ? glJournalLine.getDR_TaxTotalAmt() : glJournalLine.getCR_TaxTotalAmt();
}
@Override
public void setTaxTotalAmt(final BigDecimal totalAmt)
{
if (isAccountSignDR())
{
glJournalLine.setDR_TaxTotalAmt(totalAmt);
}
else
{
glJournalLine.s... | public I_C_ValidCombination getTaxTotal_Acct()
{
return isAccountSignDR() ? glJournalLine.getAccount_CR() : glJournalLine.getAccount_DR();
}
@Override
public CurrencyPrecision getPrecision()
{
final CurrencyId currencyId = CurrencyId.ofRepoIdOrNull(glJournalLine.getC_Currency_ID());
return currencyId != nul... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal\impl\GLJournalLineTaxAccountable.java | 1 |
请完成以下Java代码 | public class MapUtil {
public static String getString(Map map,String key){
if(map!=null && map.containsKey(key)){
try{
return map.get(key).toString();
}catch (Exception e){
e.printStackTrace();
return "";
... | }
}
public static Boolean getBoolean(Map map,String key){
if(map!=null && map.containsKey(key)){
try{
return Boolean.parseBoolean(map.get(key).toString()) || "true".equals(map.get(key).toString());
}catch (Exception e){
e.printStackTrace();
... | repos\SpringBootCodeGenerator-master\src\main\java\com\softdev\system\generator\util\MapUtil.java | 1 |
请完成以下Java代码 | public class Dom4jTransformer {
private final Document input;
public Dom4jTransformer(String resourcePath) throws DocumentException, SAXException {
// 1- Build the doc from the XML file
SAXReader xmlReader = new SAXReader();
xmlReader.setFeature("http://apache.org/xml/features/disallow-... | List<Node> nodes = xpath.selectNodes(input);
// 3- Make the change on the selected nodes
for (int i = 0; i < nodes.size(); i++) {
Element element = (Element) nodes.get(i);
element.addAttribute(attribute, newValue);
}
// 4- Save the result to a new XML doc
... | repos\tutorials-master\xml-modules\xml-2\src\main\java\com\baeldung\xml\attribute\Dom4jTransformer.java | 1 |
请完成以下Java代码 | public void setLoopDataOutputRef(String loopDataOutputRef) {
this.loopDataOutputRef = loopDataOutputRef;
}
public String getOutputDataItem() {
return outputDataItem;
}
public boolean hasOutputDataItem() {
return outputDataItem != null && !outputDataItem.trim().isEmpty();
}
... | protected Object getResultElementItem(Map<String, Object> availableVariables) {
if (hasOutputDataItem()) {
return availableVariables.get(getOutputDataItem());
} else {
//exclude from the result all the built-in multi-instances variables
//and loopDataOutputRef itself ... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\MultiInstanceActivityBehavior.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int create(List<SmsHomeBrand> homeBrandList) {
for (SmsHomeBrand smsHomeBrand : homeBrandList) {
smsHomeBrand.setRecommendStatus(1);
smsHomeBrand.setSort(0);
homeBrandMapper.insert(smsHomeBrand);
}
return homeBrandList.size();
}
@Override
p... | SmsHomeBrandExample example = new SmsHomeBrandExample();
example.createCriteria().andIdIn(ids);
SmsHomeBrand record = new SmsHomeBrand();
record.setRecommendStatus(recommendStatus);
return homeBrandMapper.updateByExampleSelective(record,example);
}
@Override
public List<SmsH... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\SmsHomeBrandServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public JpaProperties jpaProperties() {
return new JpaProperties();
}
/**
* 获取主库实体管理工厂对象
*
* @param primaryDataSource 注入名为primaryDataSource的数据源
* @param jpaProperties 注入名为primaryJpaProperties的jpa配置信息
* @param builder 注入EntityManagerFactoryBuilder
* @return 实体管... | * @return 实体管理对象
*/
@Primary
@Bean(name = "primaryEntityManager")
public EntityManager entityManager(@Qualifier("primaryEntityManagerFactory") EntityManagerFactory factory) {
return factory.createEntityManager();
}
/**
* 获取主库事务管理对象
*
* @param factory 注入名为primaryEntityMan... | repos\spring-boot-demo-master\demo-multi-datasource-jpa\src\main\java\com\xkcoding\multi\datasource\jpa\config\PrimaryJpaConfig.java | 2 |
请完成以下Java代码 | public float cosineForUnitVector(Vector other)
{
return dot(other);
}
/**
* 夹角的余弦<br>
*
* @param other
* @return
*/
public float cosine(Vector other)
{
return dot(other) / this.norm() / other.norm();
}
public Vector minus(Vector other)
{
... | elementArray[i] = elementArray[i] / f;
}
return this;
}
/**
* 自身归一化
*
* @return
*/
public Vector normalize()
{
divideToSelf(norm());
return this;
}
public float[] getElementArray()
{
return elementArray;
}
public void set... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Vector.java | 1 |
请完成以下Java代码 | public int getLineWidth ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_LineWidth);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
... | return ii.intValue();
}
/** Set Repeat Distance.
@param RepeatDistance
Distance in points to repeat gradient color - or zero
*/
public void setRepeatDistance (int RepeatDistance)
{
set_Value (COLUMNNAME_RepeatDistance, Integer.valueOf(RepeatDistance));
}
/** Get Repeat Distance.
@return Distance in ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Color.java | 1 |
请完成以下Java代码 | public IWorkPackageParamsBuilder setParameter(final String parameterName, final Object parameterValue)
{
assertNotBuilt();
Check.assumeNotEmpty(parameterName, "parameterName not empty");
parameterName2valueMap.put(parameterName, parameterValue);
return this;
}
@Override
public IWorkPackageParamsBuilder s... | assertNotBuilt();
if (parameters == null)
{
return this;
}
final Collection<String> parameterNames = parameters.getParameterNames();
if(parameterNames.isEmpty())
{
return this;
}
for (final String parameterName : parameterNames)
{
Check.assumeNotEmpty(parameterName, "parameterName not em... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageParamsBuilder.java | 1 |
请完成以下Java代码 | public void setKeyClassIdFieldName(String keyClassIdFieldName) {
this.keyClassIdFieldName = keyClassIdFieldName;
}
public void setIdClassMapping(Map<String, Class<?>> idClassMapping) {
this.idClassMapping.putAll(idClassMapping);
createReverseMap();
}
@Override
public void setBeanClassLoader(ClassLoader cla... | if (header != null) {
String classId = null;
if (header.value() != null) {
classId = new String(header.value(), StandardCharsets.UTF_8);
}
return classId;
}
return null;
}
private void createReverseMap() {
this.classIdMapping.clear();
for (Map.Entry<String, Class<?>> entry : this.idClassMappi... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\mapping\AbstractJavaTypeMapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDecisionDefinitionId() {
return decisionDefinitionId;
}
public void setDecisionDefinitionId(String decisionDefinitionId) {
this.decisionDefinitionId = decisionDefinitionId;
}
public String getDeploymentId() {
return deploymentId;
}
public void setDeplo... | return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getTenantId() {
return tenantId;
... | repos\flowable-engine-main\modules\flowable-dmn-rest\src\main\java\org\flowable\dmn\rest\service\api\history\HistoricDecisionExecutionResponse.java | 2 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Task.class, CMMN_ELEMENT_TASK)
.namespaceUri(CMMN11_NS)
.extendsType(PlanItemDefinition.class)
.instanceProvider(new ModelTypeInstanceProvider<Task>() {
public... | .build();
outputsCollection = sequenceBuilder.elementCollection(OutputsCaseParameter.class)
.build();
inputParameterCollection = sequenceBuilder.elementCollection(InputCaseParameter.class)
.build();
outputParameterCollection = sequenceBuilder.elementCollection(OutputCaseParameter.class)
... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\TaskImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PriceListVersionConfiguration
{
private static final Logger logger = LogManager.getLogger(PriceListVersionConfiguration.class);
private static Supplier<IPricingRule> huPricingRuleFactory = null;
public static void setupHUPricing(
@NonNull final Supplier<IPricingRule> huPricingRuleFactory,
@NonNu... | }
public static void reset()
{
if (!Adempiere.isUnitTestMode())
{
throw new AdempiereException("Resetting PriceListVersion configuration is allowed only when running in JUnit mode");
}
ProductPrices.clearMainProductPriceMatchers();
PriceListVersionConfiguration.huPricingRuleFactory = null;
logger.in... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\price_list_version\PriceListVersionConfiguration.java | 2 |
请完成以下Java代码 | public class EventRegistryProcessingInfo {
protected List<EventConsumerInfo> eventConsumerInfos;
public boolean eventHandled() {
return eventConsumerInfos != null && !eventConsumerInfos.isEmpty();
}
public void addEventConsumerInfo(EventConsumerInfo eventInfo) {
if (eventConsu... | public List<EventConsumerInfo> getEventConsumerInfos() {
return eventConsumerInfos;
}
public void setEventConsumerInfos(List<EventConsumerInfo> eventConsumerInfos) {
this.eventConsumerInfos = eventConsumerInfos;
}
@Override
public String toString() {
return new StringJoiner... | repos\flowable-engine-main\modules\flowable-event-registry-api\src\main\java\org\flowable\eventregistry\api\EventRegistryProcessingInfo.java | 1 |
请完成以下Java代码 | public String getDeploymentId() {
return deploymentId;
}
public CaseExecutionState getState() {
return state;
}
public boolean isCaseInstancesOnly() {
return true;
}
public String getSuperProcessInstanceId() {
return superProcessInstanceId;
}
public String getSubProcessInstanceId() {... | return superCaseInstanceId;
}
public String getSubCaseInstanceId() {
return subCaseInstanceId;
}
public Boolean isRequired() {
return required;
}
public Boolean isRepeatable() {
return repeatable;
}
public Boolean isRepetition() {
return repetition;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseInstanceQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CacheProperties getCache() {
return this.cache;
}
public ClusterProperties getCluster() {
return this.cluster;
}
public DiskStoreProperties getDisk() {
return this.disk;
}
public EntityProperties getEntities() {
return this.entities;
}
public LocatorProperties getLocator() {
return this.loc... | }
public PoolProperties getPool() {
return this.pool;
}
public SecurityProperties getSecurity() {
return this.security;
}
public ServiceProperties getService() {
return this.service;
}
public boolean isUseBeanFactoryLocator() {
return this.useBeanFactoryLocator;
}
public void setUseBeanFactoryLoca... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\GemFireProperties.java | 2 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_A_Depreciation_Convention[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set A_Depreciation_Convention_ID.
@param A_Depreciation_Convention_ID A_Depreciation_Convention_ID */
public void setA_Depreciation... | return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (St... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Convention.java | 1 |
请在Spring Boot框架中完成以下Java代码 | ApplicationRunner runner(ReplyingKafkaTemplate<String, String, String> template) {
return args -> {
// tag::sendReceive[]
RequestReplyTypedMessageFuture<String, String, Thing> future1 =
template.sendAndReceive(MessageBuilder.withPayload("getAThing").build(),
... | public String getThingProp() {
return this.thingProp;
}
public void setThingProp(String thingProp) {
this.thingProp = thingProp;
}
@Override
public String toString() {
return "Thing [thingProp=" + this.thingProp + "]";
}
}
} | repos\spring-kafka-main\spring-kafka-docs\src\main\java\org\springframework\kafka\jdocs\requestreply\Application.java | 2 |
请完成以下Java代码 | public void setM_AttributeValue_ID (final int M_AttributeValue_ID)
{
if (M_AttributeValue_ID < 1)
set_Value (COLUMNNAME_M_AttributeValue_ID, null);
else
set_Value (COLUMNNAME_M_AttributeValue_ID, M_AttributeValue_ID);
}
@Override
public int getM_AttributeValue_ID()
{
return get_ValueAsInt(COLUMNNAM... | @Override
public void setValueDate (final @Nullable java.sql.Timestamp ValueDate)
{
set_Value (COLUMNNAME_ValueDate, ValueDate);
}
@Override
public java.sql.Timestamp getValueDate()
{
return get_ValueAsTimestamp(COLUMNNAME_ValueDate);
}
@Override
public void setValueNumber (final @Nullable BigDecimal Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Record_Attribute.java | 1 |
请完成以下Java代码 | public void setReadCount(Integer readCount) {
this.readCount = readCount;
}
public String getPics() {
return pics;
}
public void setPics(String pics) {
this.pics = pics;
}
public String getMemberIcon() {
return memberIcon;
}
public void setMemberIcon(S... | sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", productId=").append(productId);
sb.append(", memberNickName=").append(memberNickName);
sb.append(", productName=").append(productName);
sb.append(", star=").append(star);
sb.append(", mem... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsComment.java | 1 |
请完成以下Java代码 | public class StreamFromEmptyList {
public static void main(String[] args) {
createStreamFromEmptyList();
List<String> nameList = getList();
printNameLengths(nameList); // passing null
printNameLengths((nameList == null) ? List.of() : nameList); // passing empty list
... | for (String name : nameList) {
System.out.println("Length of " + name + ": " + name.length());
}
} else {
System.out.println("List is null. Unable to process.");
}
// With Stream - More concise approach
Optional.ofNullable(nameList).ifPresent(list... | repos\tutorials-master\core-java-modules\core-java-streams-6\src\main\java\com\baeldung\streams\emptylists\StreamFromEmptyList.java | 1 |
请完成以下Java代码 | public static RemoteToLocalSyncResult notYetAddedToRemotePlatform(@NonNull final DataRecord datarecord)
{
return RemoteToLocalSyncResult.builder()
.synchedDataRecord(datarecord)
.remoteToLocalStatus(RemoteToLocalStatus.NOT_YET_ADDED_TO_REMOTE_PLATFORM)
.build();
}
/** contact or campaign that doesn't ... | /** See {@link RemoteToLocalSyncResult#obtainedEmailBounceInfo(DataRecord)}. */
OBTAINED_EMAIL_BOUNCE_INFO,
OBTAINED_NEW_CONTACT_PERSON, NO_CHANGES, OBTAINED_OTHER_REMOTE_DATA, ERROR;
}
RemoteToLocalStatus remoteToLocalStatus;
String errorMessage;
DataRecord synchedDataRecord;
@Builder
private RemoteTo... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\model\RemoteToLocalSyncResult.java | 1 |
请完成以下Java代码 | public Batch updateSuspensionStateAsync(ProcessEngine engine) {
int params = parameterCount(processInstanceIds, processInstanceQuery, historicProcessInstanceQuery);
if (params == 0) {
String message = "Either processInstanceIds, processInstanceQuery or historicProcessInstanceQuery should be set to updat... | groupBuilder = selectBuilder.byProcessInstanceQuery(processInstanceQuery.toQuery(engine));
} else {
groupBuilder.byProcessInstanceQuery(processInstanceQuery.toQuery(engine));
}
}
if (historicProcessInstanceQuery != null) {
if (groupBuilder == null) {
groupBuilder = selectBuild... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\ProcessInstanceSuspensionStateAsyncDto.java | 1 |
请完成以下Java代码 | private void ignoringNoSuchMethodError(Runnable method) {
try {
method.run();
}
catch (NoSuchMethodError ex) {
}
}
private void skipAllTldScanning(TomcatEmbeddedContext context) {
StandardJarScanFilter filter = new StandardJarScanFilter();
filter.setTldSkip("*.jar");
context.getJarScanner().setJarSc... | this.getContextLifecycleListeners().forEach(context::addLifecycleListener);
new DisableReferenceClearingContextCustomizer().customize(context);
this.getContextCustomizers().forEach((customizer) -> customizer.customize(context));
}
/**
* Factory method called to create the {@link TomcatWebServer}. Subclasses ca... | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\reactive\TomcatReactiveWebServerFactory.java | 1 |
请完成以下Java代码 | public void setPointsBase_Invoiced (final BigDecimal PointsBase_Invoiced)
{
set_Value (COLUMNNAME_PointsBase_Invoiced, PointsBase_Invoiced);
}
@Override
public BigDecimal getPointsBase_Invoiced()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PointsBase_Invoiced);
return bd != null ? bd : BigDeci... | @Override
public java.lang.String getPOReference()
{
return get_ValueAsString(COLUMNNAME_POReference);
}
@Override
public void setQty (final BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
@Override
public BigDecimal getQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_Commission_Instance.java | 1 |
请完成以下Java代码 | public LookupDataSourceContext.Builder newContextForFetchingById(final Object id)
{
return LookupDataSourceContext.builderWithoutTableName();
}
@Override
@Nullable
public abstract LookupValue retrieveLookupValueById(@NonNull LookupDataSourceContext evalCtx);
@Override
public LookupDataSourceContext.Builder n... | return true;
}
@Override
public void cacheInvalidate()
{
}
@Override
public Optional<WindowId> getZoomIntoWindowId()
{
return Optional.empty();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\SimpleLookupDescriptorTemplate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setRepairOrderSummary (final @Nullable java.lang.String RepairOrderSummary)
{
set_Value (COLUMNNAME_RepairOrderSummary, RepairOrderSummary);
}
@Override
public java.lang.String getRepairOrderSummary()
{
return get_ValueAsString(COLUMNNAME_RepairOrderSummary);
}
@Override
public void setRepair... | /** Not Started = NS */
public static final String STATUS_NotStarted = "NS";
/** In Progress = IP */
public static final String STATUS_InProgress = "IP";
/** Completed = CO */
public static final String STATUS_Completed = "CO";
@Override
public void setStatus (final java.lang.String Status)
{
set_Value (COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java-gen\de\metas\servicerepair\repository\model\X_C_Project_Repair_Task.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean isAutoCreateIndex() {
return this.autoCreateIndex;
}
public void setAutoCreateIndex(boolean autoCreateIndex) {
this.autoCreateIndex = autoCreateIndex;
}
public @Nullable String getUserName() {
return this.userName;
}
public void setUserName(@Nullable String userName) {
this.userName = us... | return this.apiKeyCredentials;
}
public void setApiKeyCredentials(@Nullable String apiKeyCredentials) {
this.apiKeyCredentials = apiKeyCredentials;
}
public boolean isEnableSource() {
return this.enableSource;
}
public void setEnableSource(boolean enableSource) {
this.enableSource = enableSource;
}
} | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\elastic\ElasticProperties.java | 2 |
请完成以下Java代码 | public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Customer patient = (Customer) o;
return Objects.equals(id, patient.id);
}
@Override
public int hashCode() {
return Objects.hash(id);
}
pu... | this.email = email;
}
public LocalDate getDob() {
return dob;
}
public void setDob(LocalDate dob) {
this.dob = dob;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\java\com\baeldung\spring\data\jpa\joinquery\entities\Customer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void saveUserPosition(String userIds, String positionId) {
String[] userIdArray = userIds.split(SymbolConstant.COMMA);
//存在的用户
StringBuilder userBuilder = new StringBuilder();
for (String userId : userIdArray) {
//获取成员是否存在于职位中
Long count = sysUserPositionMa... | String realnames = sysUsers.stream().map(SysUser::getRealname).collect(Collectors.joining(SymbolConstant.COMMA));
throw new JeecgBootException(realnames + "已存在该职位中");
}
}
@Override
public void removeByPositionId(String positionId) {
sysUserPositionMapper.removeByPositionId(posit... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysUserPositionServiceImpl.java | 2 |
请完成以下Java代码 | public void setIsCanExport (boolean IsCanExport)
{
set_Value (COLUMNNAME_IsCanExport, Boolean.valueOf(IsCanExport));
}
/** Get Kann exportieren.
@return Users with this role can export data
*/
@Override
public boolean isCanExport ()
{
Object oo = get_Value(COLUMNNAME_IsCanExport);
if (oo != null)
... | return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Schreibgeschützt.
@param IsReadOnly
Field is read only
*/
@Override
public void setIsReadOnly (boolean IsReadOnly)
{
set_Value (COLUMNNAME_IsReadOnly, Boolean.valueOf(IsReadOnly));
}
/** Get Schreibgeschützt... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Table_Access.java | 1 |
请完成以下Java代码 | private I_PP_Order_BOMLine getTargetOrderBOMLine(@NonNull final ProductId productId)
{
final List<I_PP_Order_BOMLine> targetBOMLines = targetOrderBOMLines;
//
// Find the BOM line which is strictly matching our product
final I_PP_Order_BOMLine targetBOMLine = targetBOMLines
.stream()
.filter(bomLine -... | //
// Case: if this is an Issue BOM Line, IssueMethod is Backflush and we did not over-issue on it yet
// => enforce the capacity to Projected Qty Required (i.e. standard Qty that needs to be issued on this line).
// initial concept: http://dewiki908/mediawiki/index.php/07433_Folie_Zuteilung_Produktion_Fertigs... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\hu_pporder_issue_producer\CreateDraftIssuesCommand.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String convertResourceNameToURLString(final String resourceName)
{
if (Check.isEmpty(reportsPathPrefix))
{
return resourceName;
}
final StringBuilder urlStr = new StringBuilder();
if (resourceName.startsWith(PLACEHOLDER))
{
if (resourceName.startsWith(PLACEHOLDER + "/"))
{
urlStr.a... | urlStr.append("/");
}
urlStr.append(report);
alwaysPrependPrefix = true;
return urlStr.toString();
}
}
if (alwaysPrependPrefix)
{
urlStr.append(reportsPathPrefix);
if (!reportsPathPrefix.endsWith("/") && !resourceName.startsWith("/"))
{
urlStr.append("/");
}
}
urlStr.appe... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\class_loader\JasperClassLoader.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void mergeFile(String fName, long page) {
File file = new File(DOWN_PATH, fName);
try {
BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(file));
for (long i = 0; i <= page; i++) {
File tempFile = new File(DOWN_PATH, i + "-" + fName);... | if (sHeader != null && sHeader.equals("Content-Length")) {
LOGGER.debug("file size ContentLength:" + httpConnection.getContentLength());
fileSize = Long.parseLong(httpConnection.getHeaderField(sHeader));
break;
}
}
return fileSize;
}
c... | repos\springboot-demo-master\file\src\main\java\com\et\controller\DownloadController.java | 2 |
请完成以下Java代码 | public final class ExpressionContext
{
public static final Builder builder()
{
return new Builder();
}
public static final ExpressionContext EMPTY = new ExpressionContext();
private final ImmutableMap<String, Object> context;
private ExpressionContext(final ImmutableMap<String, Object> context)
{
super();... | super();
}
public ExpressionContext build()
{
final ImmutableMap<String, Object> context = this.context.build();
if (context.isEmpty())
{
return EMPTY;
}
return new ExpressionContext(context);
}
public Builder putContext(final String name, final Object value)
{
if (value == null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\ExpressionContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public java.sql.Date read(JsonReader in) throws IOException {
switch (in.peek()) {
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
try {
if (... | if (dateFormat != null) {
value = dateFormat.format(date);
} else {
value = ISO8601Utils.format(date, true);
}
out.value(value);
}
}
@Override
public Date read(JsonReader in) throws IOException {... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\JSON.java | 2 |
请完成以下Java代码 | public Integer getParseStrategy() {
return parseStrategy;
}
public void setParseStrategy(Integer parseStrategy) {
this.parseStrategy = parseStrategy;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldNam... | public String getPattern() {
return pattern;
}
public void setPattern(String pattern) {
this.pattern = pattern;
}
public Integer getMatchStrategy() {
return matchStrategy;
}
public void setMatchStrategy(Integer matchStrategy) {
this.matchStrategy = matchStrateg... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\vo\gateway\rule\GatewayParamFlowItemVo.java | 1 |
请完成以下Java代码 | public class ClassDelegateCaseExecutionListener extends ClassDelegate implements CaseExecutionListener {
protected static final CmmnBehaviorLogger LOG = ProcessEngineLogger.CMNN_BEHAVIOR_LOGGER;
public ClassDelegateCaseExecutionListener(String className, List<FieldDeclaration> fieldDeclarations) {
super(class... | .handleInvocation(new CaseExecutionListenerInvocation(listenerInstance, caseExecution));
}
protected CaseExecutionListener getListenerInstance() {
Object delegateInstance = instantiateDelegate(className, fieldDeclarations);
if (delegateInstance instanceof CaseExecutionListener) {
return (CaseExecutio... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\listener\ClassDelegateCaseExecutionListener.java | 1 |
请完成以下Java代码 | public List<String> getFollowingIds() {
return Collections.unmodifiableList(followingIds);
}
public List<String> getFavoriteArticleIds() {
return Collections.unmodifiableList(favoriteArticleIds);
}
public void follow(String userId) {
followingIds.add(userId);
}
public ... | article.incrementFavoritesCount();
favoriteArticleIds.add(article.getId());
}
public void unfavorite(Article article) {
article.decrementFavoritesCount();
favoriteArticleIds.remove(article.getId());
}
public boolean isFavoriteArticle(Article article) {
return favoriteAr... | repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\user\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setPrice (final BigDecimal Price)
{
set_Value (COLUMNNAME_Price, Price);
}
@Override
public BigDecimal getPrice()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Price);
return bd != null... | set_Value (COLUMNNAME_ScannedBarcode, ScannedBarcode);
}
@Override
public java.lang.String getScannedBarcode()
{
return get_ValueAsString(COLUMNNAME_ScannedBarcode);
}
@Override
public void setTaxAmt (final BigDecimal TaxAmt)
{
set_Value (COLUMNNAME_TaxAmt, TaxAmt);
}
@Override
public BigDecimal getT... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_OrderLine.java | 2 |
请完成以下Java代码 | protected void loadChildExecutionsFromCache(ExecutionEntity execution, List<ExecutionEntity> childExecutions) {
List<ExecutionEntity> childrenOfThisExecution = execution.getExecutions();
if(childrenOfThisExecution != null) {
childExecutions.addAll(childrenOfThisExecution);
for (ExecutionEntity child... | protected List<Incident> getIncidents(Map<String, List<Incident>> incidents,
PvmExecutionImpl execution) {
List<Incident> incidentList = incidents.get(execution.getId());
if (incidentList != null) {
return incidentList;
} else {
return Collections.emptyList();
}
}
public static cl... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetActivityInstanceCmd.java | 1 |
请完成以下Java代码 | public class Email {
@Column(name = "email", nullable = false)
private String address;
public Email(String address) {
this.address = address;
}
protected Email() {
}
@Override
public String toString() {
return address; | }
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Email email = (Email) o;
return address.equals(email.address);
}
@Override
public int hashCode() {
return Objects.hash(addres... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\Email.java | 1 |
请完成以下Java代码 | public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = ... | public void setDetails(byte[] details) {
this.details = details;
}
public byte[] getDetails() {
return this.details;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("IdentityLinkEntity[id=").append(id);
sb.append(", t... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\IdentityLinkEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private boolean isExternalSystemCompatible(
@NonNull final Workplace workplace,
@NonNull final ShipmentSchedule schedule)
{
final ImmutableSet<ExternalSystemId> workplaceExternalSystems = workplace.getExternalSystemIds();
if (workplaceExternalSystems.isEmpty())
{
return true;
}
final ExternalSystem... | {
return true;
}
return PriorityRule.equals(priorityRule, schedule.getPriorityRule());
}
private static class WorkplacesCapacity
{
private final Map<WorkplaceId, Integer> assignedCountPerWorkplace = new HashMap<>();
void increase(@NonNull final WorkplaceId workplaceId)
{
assignedCountPerWorkplace.... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job_schedule\service\commands\PickingJobScheduleAutoAssignCommand.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Saml2MetadataConfigurer<H> metadataUrl(String metadataUrl) {
Assert.hasText(metadataUrl, "metadataUrl cannot be empty");
this.metadataResponseResolver = (registrations) -> {
if (USE_OPENSAML_5) {
RequestMatcherMetadataResponseResolver metadata = new RequestMatcherMetadataResponseResolver(
regist... | RelyingPartyRegistrationRepository registrations = getRelyingPartyRegistrationRepository(http);
if (USE_OPENSAML_5) {
return new RequestMatcherMetadataResponseResolver(registrations, new OpenSaml5MetadataResolver());
}
throw new IllegalArgumentException(
"Spring Security does not support OpenSAML " + Versi... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\saml2\Saml2MetadataConfigurer.java | 2 |
请完成以下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_PrintColor[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set ... | */
public void setIsDefault (boolean IsDefault)
{
set_Value (COLUMNNAME_IsDefault, Boolean.valueOf(IsDefault));
}
/** Get Default.
@return Default value
*/
public boolean isDefault ()
{
Object oo = get_Value(COLUMNNAME_IsDefault);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintColor.java | 1 |
请完成以下Java代码 | public HashcodeBuilder append(final BigDecimal value)
{
if (value == null)
{
return appendHashcode(0);
}
final Double d = value.doubleValue();
return appendHashcode(d.hashCode());
}
public HashcodeBuilder appendHashcode(final int hashcodeToAppend)
{
hashcode = prime * hashcode + hashcodeToAppend;
... | public int toHashcode()
{
return hashcode;
}
/**
* Sames as {@link #toHashcode()} because:
* <ul>
* <li>we want to avoid bugs like calling this method instead of {@link #toHashcode()}
* <li>the real hash code of this object does not matter
* </ul>
*
* @deprecated Please use {@link #toHashcode()}. T... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\HashcodeBuilder.java | 1 |
请完成以下Java代码 | public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context)
{
final long selectedRecordsCount = getSelectedRecordCount(context);
if (selectedRecordsCount > 1)
{
return ProcessPreconditionsResolution.reject(msgBL.getTranslatableMsgText(MSG_ERR_MULTIPL... | }
@NonNull
protected Optional<ExternalSystemParentConfig> getSelectedExternalSystemConfig(@NonNull final ExternalSystemParentConfigId externalSystemParentConfigId)
{
final ExternalSystemConfigQuery query = ExternalSystemConfigQuery.builder()
.parentConfigId(externalSystemParentConfigId)
.build();
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeActivateExternalConfig.java | 1 |
请完成以下Java代码 | public void setDelegationState(DelegationState delegationState) {
activiti5Task.setDelegationState(delegationState);
}
@Override
public void setDueDate(Date dueDate) {
activiti5Task.setDueDate(dueDate);
}
@Override
public void setCategory(String category) {
activiti5Tas... | @Override
public void setTenantId(String tenantId) {
activiti5Task.setTenantId(tenantId);
}
@Override
public void setFormKey(String formKey) {
activiti5Task.setFormKey(formKey);
}
@Override
public boolean isSuspended() {
return activiti5Task.isSuspended();
}
} | repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5TaskWrapper.java | 1 |
请完成以下Java代码 | public static void main(String args[]) {
SchedulerFactory schedFact = new StdSchedulerFactory();
try {
Scheduler sched = schedFact.getScheduler();
JobDetail job = JobBuilder.newJob(SimpleJob.class).withIdentity("myJob", "group1").usingJobData("jobSays", "Hello World!").usingJo... | Trigger triggerA = TriggerBuilder.newTrigger().withIdentity("triggerA", "group2").startNow().withPriority(15).withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(40).repeatForever()).build();
Trigger triggerB = TriggerBuilder.newTrigger().withIdentity("triggerB", "group2").startNow().... | repos\tutorials-master\libraries\src\main\java\com\baeldung\quartz\QuartzExample.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void configure(AbstractEngineConfiguration engineConfiguration) {
if (dmnEngineConfiguration == null) {
dmnEngineConfiguration = new StandaloneInMemDmnEngineConfiguration();
}
initialiseCommonProperties(engineConfiguration, dmnEngineConfiguration);
initEngine... | }
@Override
protected DmnEngine buildEngine() {
if (dmnEngineConfiguration == null) {
throw new FlowableException("DmnEngineConfiguration is required");
}
return dmnEngineConfiguration.buildDmnEngine();
}
public DmnEngineConfiguration getDmnEngineConfiguration() {
... | repos\flowable-engine-main\modules\flowable-dmn-engine-configurator\src\main\java\org\flowable\dmn\engine\configurator\DmnEngineConfigurator.java | 2 |
请完成以下Java代码 | protected TreeBuilder createDefaultTreeBuilder(Feature... features) {
return new Builder(features);
}
private Class<?> load(Class<?> clazz, Properties properties) {
if (properties != null) {
String className = properties.getProperty(clazz.getName());
if (className != null) {
ClassLoader loader;
try... | return new ObjectValueExpression(converter, instance, expectedType);
}
@Override
public final TreeValueExpression createValueExpression(ELContext context, String expression, Class<?> expectedType) {
return new TreeValueExpression(store, context.getFunctionMapper(), context.getVariableMapper(), converter,
expr... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\de\odysseus\el\ExpressionFactoryImpl.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_Data_Export_Audit getData_Export_Audit()
{
return get_ValueAsPO(COLUMNNAME_Data_Export_Audit_ID, org.compiere.model.I_Data_Export_Audit.class);
}
@Override
public void setData_Export_Audit(final org.compiere.model.I_Data_Export_Audit Data_Export_Audit)
{
set_ValueFromPO(COLUMNNAME_... | if (Data_Export_Audit_Log_ID < 1)
set_ValueNoCheck (COLUMNNAME_Data_Export_Audit_Log_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Data_Export_Audit_Log_ID, Data_Export_Audit_Log_ID);
}
@Override
public int getData_Export_Audit_Log_ID()
{
return get_ValueAsInt(COLUMNNAME_Data_Export_Audit_Log_ID);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Data_Export_Audit_Log.java | 1 |
请完成以下Java代码 | public void setElement(DmnElement element) {
this.element = element;
}
public int getXmlRowNumber() {
return xmlRowNumber;
}
public void setXmlRowNumber(int xmlRowNumber) {
this.xmlRowNumber = xmlRowNumber;
}
public int getXmlColumnNumber() {
return xmlColumnNu... | return false;
}
if (this.getWidth() != ginfo.getWidth()) {
return false;
}
// check for zero value in case we are comparing model value to BPMN DI value
// model values do not have xml location information
if (0 != this.getXmlColumnNumber() && 0 != ginfo.getX... | repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\GraphicInfo.java | 1 |
请完成以下Java代码 | public class QuartzExample {
public static void main(String args[]) {
SchedulerFactory schedFact = new StdSchedulerFactory();
try {
Scheduler sched = schedFact.getScheduler();
JobDetail job = JobBuilder.newJob(SimpleJob.class).withIdentity("myJob", "group1").usingJobData(... | Trigger triggerA = TriggerBuilder.newTrigger().withIdentity("triggerA", "group2").startNow().withPriority(15).withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(40).repeatForever()).build();
Trigger triggerB = TriggerBuilder.newTrigger().withIdentity("triggerB", "group2").startNow().... | repos\tutorials-master\libraries\src\main\java\com\baeldung\quartz\QuartzExample.java | 1 |
请完成以下Java代码 | public Evaluatee toEvaluatee()
{
Evaluatee evaluatee = _evaluatee;
if (evaluatee == null)
{
evaluatee = _evaluatee = createEvaluatee();
}
return evaluatee;
}
private Evaluatee createEvaluatee()
{
return Evaluatees.mapBuilder()
.put(Env.CTXNAME_AD_User_ID, loggedUserId.map(UserId::getRepoId).orEl... | {
jsonOptions = _jsonOptions = createJSONOptions();
}
return jsonOptions;
}
private JSONOptions createJSONOptions()
{
return JSONOptions.builder()
.adLanguage(adLanguage)
.zoneId(timeZone)
.build();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewEvaluationCtx.java | 1 |
请完成以下Java代码 | public void setVisible(final boolean visible)
{
super.setVisible(visible);
if (visible)
{
toFront();
}
} // setVisible
/**
* Calculate size and display
*/
private void display()
{
pack();
final Dimension ss = Toolkit.getDefaultToolkit().getScreenSize(); | final Rectangle bounds = getBounds();
setBounds((ss.width - bounds.width) / 2, (ss.height - bounds.height) / 2,
bounds.width, bounds.height);
setVisible(true);
} // display
/**
* Dispose Splash
*/
@Override
public void dispose()
{
super.dispose();
s_splash = null;
} // dispose
} // Splash | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Splash.java | 1 |
请完成以下Java代码 | public class Order {
private UUID id;
private OrderStatus status;
private List<OrderItem> orderItems;
private BigDecimal price;
public Order(final UUID id, final Product product) {
this.id = id;
this.orderItems = new ArrayList<>(Collections.singletonList(new OrderItem(product)));
... | }
}
private void validateProduct(final Product product) {
if (product == null) {
throw new DomainException("The product cannot be null.");
}
}
public UUID getId() {
return id;
}
public OrderStatus getStatus() {
return status;
}
public BigDe... | repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\dddhexagonalspring\domain\Order.java | 1 |
请完成以下Java代码 | public void setPickingJobAggregationType (final java.lang.String PickingJobAggregationType)
{
set_Value (COLUMNNAME_PickingJobAggregationType, PickingJobAggregationType);
}
@Override
public java.lang.String getPickingJobAggregationType()
{
return get_ValueAsString(COLUMNNAME_PickingJobAggregationType);
}
... | @Override
public java.sql.Timestamp getPreparationDate()
{
return get_ValueAsTimestamp(COLUMNNAME_PreparationDate);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Job.java | 1 |
请完成以下Java代码 | public List<CleanableHistoricProcessInstanceReportResult> executeList(CommandContext commandContext, final Page page) {
provideHistoryCleanupStrategy(commandContext);
checkQueryOk();
return commandContext
.getHistoricProcessInstanceManager()
.findCleanableHistoricProcessInstancesReportByCri... | public void setTenantIdIn(String[] tenantIdIn) {
this.tenantIdIn = tenantIdIn;
}
public boolean isTenantIdSet() {
return isTenantIdSet;
}
public boolean isCompact() {
return isCompact;
}
protected void provideHistoryCleanupStrategy(CommandContext commandContext) {
String historyCleanupStr... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\CleanableHistoricProcessInstanceReportImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SessionUserInfo getUserInfo() {
String token = MDC.get("token");
return getUserInfoFromCache(token);
}
/**
* 根据token查询用户信息
* 如果token无效,会抛未登录的异常
*/
private SessionUserInfo getUserInfoFromCache(String token) {
if (StringTools.isNullOrEmpty(token)) {
t... | * 退出登录时,将token置为无效
*/
public void invalidateToken() {
String token = MDC.get("token");
if (!StringTools.isNullOrEmpty(token)) {
cacheMap.invalidate(token);
}
log.debug("退出登录,清除缓存:token={}", token);
}
private SessionUserInfo getUserInfoByUsername(String usern... | repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\service\TokenService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Boolean isArchived() {
return archived;
}
public void setArchived(Boolean archived) {
this.archived = archived;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
... | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PackagingUnit {\n");
sb.append(" unit: ").append(toIndentedString(unit)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" pcn: ").append(toIndentedStri... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\PackagingUnit.java | 2 |
请完成以下Java代码 | public void setNotice(final String notice)
{
label.setText(notice);
}
public String getNotice()
{
return label.getText();
}
/**
* Load status from context
*/
public void load()
{
final Properties ctx = Env.getCtx();
// FRESH-352: check if we shall override the default background color which we se... | final String windowHeaderNotice = Env.getContext(ctx, Env.CTXNAME_UI_WindowHeader_Notice_Text);
if (!Check.isEmpty(windowHeaderNotice, true) && !"-".equals(windowHeaderNotice))
{
setNotice(windowHeaderNotice);
setVisible(true);
}
else
{
setNotice("");
setVisible(false);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\swing\WindowHeaderNotice.java | 1 |
请完成以下Java代码 | public int getMSV3_BestellungAntwortPosition_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_MSV3_BestellungAntwortPosition_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_Substitution getMSV3_BestellungSubstitution() t... | {
if (MSV3_BestellungSubstitution_ID < 1)
set_Value (COLUMNNAME_MSV3_BestellungSubstitution_ID, null);
else
set_Value (COLUMNNAME_MSV3_BestellungSubstitution_ID, Integer.valueOf(MSV3_BestellungSubstitution_ID));
}
/** Get BestellungSubstitution.
@return BestellungSubstitution */
@Override
public in... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_BestellungAntwortPosition.java | 1 |
请完成以下Java代码 | public class AttachmentEntityManager extends AbstractManager {
@SuppressWarnings("unchecked")
public List<Attachment> findAttachmentsByProcessInstanceId(String processInstanceId) {
checkHistoryEnabled();
return getDbSqlSession().selectList("selectAttachmentsByProcessInstanceId", processInstance... | if (contentId != null) {
getByteArrayManager().deleteByteArrayById(contentId);
}
getDbSqlSession().delete(attachment);
if (dispatchEvents) {
getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(
ActivitiEventBuilde... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AttachmentEntityManager.java | 1 |
请完成以下Java代码 | protected HistoricCaseInstanceEventEntity newCaseInstanceEventEntity(CaseExecutionEntity caseExecutionEntity) {
return new HistoricCaseInstanceEventEntity();
}
protected HistoricCaseInstanceEventEntity loadCaseInstanceEventEntity(CaseExecutionEntity caseExecutionEntity) {
return newCaseInstanceEventEntity(... | evt.setEventType(eventType.getEventName());
evt.setCaseDefinitionId(caseExecutionEntity.getCaseDefinitionId());
evt.setCaseInstanceId(caseExecutionEntity.getCaseInstanceId());
evt.setCaseExecutionId(caseExecutionEntity.getId());
evt.setCaseActivityInstanceState(caseExecutionEntity.getState());
evt.... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\DefaultCmmnHistoryEventProducer.java | 1 |
请完成以下Java代码 | public class NeurophXOR {
public static NeuralNetwork assembleNeuralNetwork() {
Layer inputLayer = new Layer();
inputLayer.addNeuron(new Neuron());
inputLayer.addNeuron(new Neuron());
Layer hiddenLayerOne = new Layer();
hiddenLayerOne.addNeuron(new Neuron());
hidde... | int inputSize = 2;
int outputSize = 1;
DataSet ds = new DataSet(inputSize, outputSize);
DataSetRow rOne = new DataSetRow(new double[] { 0, 1 }, new double[] { 1 });
ds.addRow(rOne);
DataSetRow rTwo = new DataSetRow(new double[] { 1, 1 }, new double[] { 0 });
ds.addRow(rT... | repos\tutorials-master\libraries-ai\src\main\java\neuroph\NeurophXOR.java | 1 |
请完成以下Java代码 | public int getRevisionNext() {
return revision+1;
}
// getters and setters //////////////////////////////////////////////////////
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String... | }
public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public Date getRemovalTime() {
return removalTime;
}
public void setRemovalTime(Date remov... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ByteArrayEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RedisRouteDefinitionRepository implements RouteDefinitionRepository {
private static final Logger log = LoggerFactory.getLogger(RedisRouteDefinitionRepository.class);
/**
* Key prefix for RouteDefinition queries to redis.
*/
private static final String ROUTEDEFINITION_REDIS_KEY_PREFIX_QUERY = "rou... | });
});
}
@Override
public Mono<Void> delete(Mono<String> routeId) {
return routeId.flatMap(id -> routeDefinitionReactiveValueOperations.delete(createKey(id)).flatMap(success -> {
if (success) {
return Mono.empty();
}
return Mono.defer(() -> Mono.error(new NotFoundException(
String.format("Co... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\route\RedisRouteDefinitionRepository.java | 2 |
请完成以下Java代码 | public void addNewExecutionId(String executionId) {
this.newExecutionIds.add(executionId);
}
public ExecutionEntity getCreatedEventSubProcess(String processDefinitionId) {
return createdEventSubProcesses.get(processDefinitionId);
}
public void addCreatedEventSubProcess(String processDe... | this.flowElementLocalVariableMap.put(activityId, localVariables);
}
public static class FlowElementMoveEntry {
protected FlowElement originalFlowElement;
protected FlowElement newFlowElement;
public FlowElementMoveEntry(FlowElement originalFlowElement, FlowElement newFlowElement) {
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\dynamic\MoveExecutionEntityContainer.java | 1 |
请完成以下Java代码 | protected String getDeploymentMode() {
return DEPLOYMENT_MODE;
}
@Override
protected void deployResourcesInternal(String deploymentNameHint, Resource[] resources, EventRegistryEngine engine) {
EventRepositoryService repositoryService = engine.getEventRepositoryService();
// Create ... | deploymentBuilder.deploy();
} catch (RuntimeException e) {
if (isThrowExceptionOnDeploymentFailure()) {
throw e;
} else {
LOGGER.warn("Exception while autodeploying event definitions. "
+ "This exception can be ignored if the root caus... | repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\autodeployment\DefaultAutoDeploymentStrategy.java | 1 |
请完成以下Java代码 | public PickingJob closeTUPickingTarget(
@NonNull final PickingJob pickingJob,
@Nullable final PickingJobLineId lineId)
{
return pickingJobService.closeTUPickingTarget(pickingJob, lineId);
}
@NonNull
public PickingJobOptions getPickingJobOptions(@Nullable final BPartnerId customerId) {return configService.g... | return pickingJobService.getPickingSlotsSuggestions(pickingJob);
}
public PickingJob pickAll(@NonNull final PickingJobId pickingJobId, final @NonNull UserId callerId)
{
return pickingJobService.pickAll(pickingJobId, callerId);
}
public PickingJobQtyAvailable getQtyAvailable(@NonNull final PickingJobId pickingJ... | repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\PickingJobRestService.java | 1 |
请完成以下Java代码 | public void setProcessEngine(ProcessEngine processEngine) {
this.processEngine = processEngine;
}
public void afterPropertiesSet() throws Exception {
this.advisor = new ProcessStartingPointcutAdvisor(this.processEngine);
}
public Object postProcessAfterInitialization(Object bean, String beanName) throws Beans... | // Copy our properties (proxyTargetClass etc) inherited from ProxyConfig.
proxyFactory.copyFrom(this);
proxyFactory.addAdvisor(this.advisor);
return proxyFactory.getProxy(this.beanClassLoader);
}
}
else {
// No async proxy needed.
return bean;
}
}
public Object postProcessBeforeInitializat... | repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\aop\ProcessStartAnnotationBeanPostProcessor.java | 1 |
请完成以下Java代码 | public class PMMWeekReportEventsProcessor
{
public static final PMMWeekReportEventsProcessor newInstance()
{
return new PMMWeekReportEventsProcessor();
}
private final transient ITrxItemProcessorExecutorService trxItemProcessorExecutorService = Services.get(ITrxItemProcessorExecutorService.class);
private PMMW... | {
final Properties ctx = Env.getCtx();
final EventSource<I_PMM_WeekReport_Event> events = new EventSource<>(ctx, I_PMM_WeekReport_Event.class);
final PMMWeekReportEventTrxItemProcessor itemProcessor = new PMMWeekReportEventTrxItemProcessor();
trxItemProcessorExecutorService.<I_PMM_WeekReport_Event, Void> creat... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\PMMWeekReportEventsProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static IPackingItem newPackingItem(@NonNull final PackingItemParts parts)
{
return new TransactionalPackingItem(parts);
}
public static IPackingItem newPackingItem(@NonNull final PackingItemPart part)
{
return new TransactionalPackingItem(PackingItemParts.of(part));
}
public static ImmutableList<IPac... | {
existingItem.addParts(newItem);
}
else
{
packingItems.put(newItem.getGroupingKey(), newItem);
}
}
return ImmutableList.copyOf(packingItems.values());
}
public static PackingItemPartBuilder newPackingItemPart(final de.metas.inoutcandidate.model.I_M_ShipmentSchedule sched)
{
final IShipme... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\PackingItems.java | 2 |
请完成以下Java代码 | public void setId(String id) {
this.id = id;
}
public Expression getLabel() {
return label;
}
public void setLabel(Expression name) {
this.label = name;
}
public void setType(AbstractFormFieldType formType) {
this.type = formType;
}
public void setProperties(Map<String, String> prope... | }
public Expression getDefaultValueExpression() {
return defaultValueExpression;
}
public void setDefaultValueExpression(Expression defaultValue) {
this.defaultValueExpression = defaultValue;
}
public List<FormFieldValidationConstraintHandler> getValidationHandlers() {
return validationHandlers... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\handler\FormFieldHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SyncRfQ implements IConfirmableDTO
{
String uuid;
boolean deleted;
long syncConfirmationId;
LocalDate dateStart;
LocalDate dateEnd;
LocalDate dateClose;
String bpartner_uuid;
SyncProduct product;
BigDecimal qtyRequested;
String qtyCUInfo;
String currencyCode;
@JsonCreator
@Builder(toBuild... | this.currencyCode = currencyCode;
}
@Override
public String toString()
{
return "SyncRfQ ["
+ "dateStart=" + dateStart
+ ", dateEnd=" + dateEnd
+ ", dateClose=" + dateClose
//
+ ", bpartner_uuid=" + bpartner_uuid
//
+ ", product=" + product
+ ", qtyRequested=" + qtyRequested + " "... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-procurement\src\main\java\de\metas\common\procurement\sync\protocol\dto\SyncRfQ.java | 2 |
请完成以下Java代码 | public void on(OrderConfirmedEvent event) {
orders.computeIfPresent(event.getOrderId(), (orderId, order) -> {
order.setOrderConfirmed();
emitUpdate(order);
return order;
});
}
@EventHandler
public void on(OrderShippedEvent event) {
orders.computeI... | .reduce(0, Integer::sum);
}
@QueryHandler
public Order handle(OrderUpdatesQuery query) {
return orders.get(query.getOrderId());
}
private void emitUpdate(Order order) {
emitter.emit(OrderUpdatesQuery.class, q -> order.getOrderId()
.equals(q.getOrderId()), order);
}
... | repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\querymodel\InMemoryOrdersEventHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PickingJobProductService
{
@NonNull private final ProductRepository productRepository;
@NonNull private final IProductBL productBL = Services.get(IProductBL.class);
@NonNull private final IUOMDAO uomDAO = Services.get(IUOMDAO.class);
public static PickingJobProductService newInstanceForUnitTesting()
... | public String getProductValue(@NonNull final ProductId productId)
{
return productBL.getProductValue(productId);
}
public boolean isValidEAN13Product(@NonNull final EAN13 ean13, @NonNull final ProductId expectedProductId, @Nullable final BPartnerId bpartnerId)
{
return productBL.isValidEAN13Product(ean13, expe... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\external\product\PickingJobProductService.java | 2 |
请完成以下Java代码 | void onUnsubackReceived() {
retransmissionHandler.stop();
}
void onChannelClosed() {
retransmissionHandler.stop();
}
static Builder builder() {
return new Builder();
}
static class Builder {
private Promise<Void> future;
private String topic;
p... | this.ownerId = ownerId;
return this;
}
Builder retransmissionConfig(MqttClientConfig.RetransmissionConfig retransmissionConfig) {
this.retransmissionConfig = retransmissionConfig;
return this;
}
Builder pendingOperation(PendingOperation pendingOperat... | repos\thingsboard-master\netty-mqtt\src\main\java\org\thingsboard\mqtt\MqttPendingUnsubscription.java | 1 |
请完成以下Java代码 | public String getAttributeValueType()
{
return X_M_Attribute.ATTRIBUTEVALUETYPE_List;
}
/**
* @return <code>false</code>, because In/Ausland is a List attribute.
*/
@Override
public boolean canGenerateValue(Properties ctx, IAttributeSet attributeSet, I_M_Attribute attribute)
{
return false;
}
@Overrid... | final I_M_Attribute inAusLandAttribute = Services.get(IInAusLandAttributeDAO.class).retrieveInAusLandAttribute(ctx);
if (inAusLandAttribute == null)
{
// In/Aus Land attribute was not configured => do nothing
return null;
}
final String inAusLand = Services.get(IInAusLandAttributeBL.class).getAttributeSt... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\org\adempiere\mm\attributes\spi\impl\InAus_LandAttributeGenerator.java | 1 |
请完成以下Java代码 | protected class CmmnParseContextImpl implements CmmnParseContext {
protected final EngineResource resource;
protected final boolean newDeployment;
public CmmnParseContextImpl(EngineResource resource, boolean newDeployment) {
this.resource = resource;
this.newDeployment ... | @Override
public boolean validateCmmnModel() {
// On redeploy, we assume it is validated at the first deploy
return newDeployment && validateXml();
}
@Override
public CaseValidator caseValidator() {
return cmmnEngineConfiguration.getCaseValidator();
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\deployer\CmmnDeployer.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.