instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
} | @Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
User book = (User) o;
return Objects.equals(id, book.id);
}
@Override
public int hashCode() {
return Objects... | repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb\src\main\java\com\baeldung\multipledb\model\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DocumentExtensionType {
@XmlElement(name = "DocumentExtension", namespace = "http://erpel.at/schemas/1p0/documents/extensions/edifact")
protected at.erpel.schemas._1p0.documents.extensions.edifact.DocumentExtensionType documentExtension;
@XmlElement(name = "ErpelDocumentExtension")
protect... | * {@link ErpelDocumentExtensionType }
*
*/
public ErpelDocumentExtensionType getErpelDocumentExtension() {
return erpelDocumentExtension;
}
/**
* Sets the value of the erpelDocumentExtension property.
*
* @param value
* allowed object is
* {@link... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\DocumentExtensionType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getQuantityTypeCodeQualifier() {
return quantityTypeCodeQualifier;
}
/**
* Sets the value of the quantityTypeCodeQualifier property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setQuantityTypeCodeQualifier(St... | */
public void setQuantity(BigDecimal value) {
this.quantity = value;
}
/**
* Gets the value of the measurementUnitCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMeasurementUnitCode() {
return meas... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ExtendedQuantityType.java | 2 |
请完成以下Spring Boot application配置 | spring:
application:
name: publisher-demo
# Kafka 配置项,对应 KafkaProperties 配置类
kafka:
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
management:
endpoints:
# Actuator HTTP 配置项,对应 WebEndpointProperties | 配置类
web:
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。 | repos\SpringBoot-Labs-master\labx-19\labx-19-sc-bus-kafka-demo-publisher-actuator\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public int getC_Order_CompensationGroup_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Order_CompensationGroup_ID);
}
@Override
public org.compiere.model.I_C_Order getC_Order()
{
return get_ValueAsPO(COLUMNNAME_C_Order_ID, org.compiere.model.I_C_Order.class);
}
@Override
public void setC_Order(final org.compi... | {
return get_ValueAsInt(COLUMNNAME_M_Product_Category_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 org.eevolution.model.I_PP_Produ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_CompensationGroup.java | 1 |
请完成以下Java代码 | public void setSourceCaseExecution(CmmnExecution sourceCaseExecution) {
this.sourceCaseExecution = (CaseExecutionEntity) sourceCaseExecution;
if (sourceCaseExecution != null) {
sourceCaseExecutionId = sourceCaseExecution.getId();
} else {
sourceCaseExecutionId = null;
}
}
// persistenc... | // helper ////////////////////////////////////////////////////////////////////
protected CaseExecutionEntity findCaseExecutionById(String caseExecutionId) {
return Context
.getCommandContext()
.getCaseExecutionManager()
.findCaseExecutionById(caseExecutionId);
}
@Override
public Se... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseSentryPartEntity.java | 1 |
请完成以下Java代码 | public void setMeta_Publisher (String Meta_Publisher)
{
set_Value (COLUMNNAME_Meta_Publisher, Meta_Publisher);
}
/** Get Meta Publisher.
@return Meta Publisher defines the publisher of the content
*/
public String getMeta_Publisher ()
{
return (String)get_Value(COLUMNNAME_Meta_Publisher);
}
/** Set M... | */
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public Ke... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WebProject.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyDeliveredInUOM_Nominal()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredInUOM_Nominal);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyDeliveredInUOM_Override (final @Nullable BigDecimal QtyDeliveredInUOM_Override)
{
set_ValueNoCheck (C... | return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyInvoiced (final BigDecimal QtyInvoiced)
{
set_Value (COLUMNNAME_QtyInvoiced, QtyInvoiced);
}
@Override
public BigDecimal getQtyInvoiced()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyInvoiced);
return bd != null ? bd... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\invoicecandidate\model\X_C_InvoiceCandidate_InOutLine.java | 1 |
请完成以下Java代码 | public class Address {
private String city;
private Country country;
public Address() {
// default constructor needed for Jackson deserialization
}
public Address(String city, Country country) {
this.city = city;
this.country = country;
}
public Country getCountry(... | public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Address address = (Address) o;... | repos\tutorials-master\core-java-modules\core-java-collections-maps-8\src\main\java\com\baeldung\map\castingmaptoobject\Address.java | 1 |
请完成以下Java代码 | public void start() {
log.info("Creating Store Procedures and Function...");
jdbcTemplate.execute(SQL_STORED_PROC_REF);
/* Test Stored Procedure RefCursor */
List<Book> books = findBookByName("Java");
// Book{id=1, name='Thinking in Java', price=46.32}
// Book{id=2, na... | SqlParameterSource paramaters = new MapSqlParameterSource()
.addValue("p_name", name);
Map out = simpleJdbcCallRefCursor.execute(paramaters);
if (out == null) {
return Collections.emptyList();
} else {
return (List) out.get("o_c_book");
}
}
... | repos\spring-boot-master\spring-jdbc\src\main\java\com\mkyong\sp\StoredProcedure2.java | 1 |
请完成以下Java代码 | public Optional<MAccount> getAccountIfExists(final TaxId taxId, final AcctSchemaId acctSchemaId, final TaxAcctType acctType)
{
return getAccountId(taxId, acctSchemaId, acctType)
.map(accountsRepo::getById);
}
@Override
public Optional<AccountId> getAccountId(@NonNull final TaxId taxId, @NonNull final AcctSch... | private I_C_Tax_Acct getTaxAcctRecord(final AcctSchemaId acctSchemaId, final TaxId taxId)
{
return taxAcctRecords.getOrLoad(
TaxIdAndAcctSchemaId.of(taxId, acctSchemaId),
this::retrieveTaxAcctRecord);
}
private I_C_Tax_Acct retrieveTaxAcctRecord(@NonNull final TaxIdAndAcctSchemaId key)
{
return Service... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\tax\impl\TaxAcctBL.java | 1 |
请完成以下Java代码 | public void unlock(final I_M_HU hu, final LockOwner lockOwner)
{
Preconditions.checkNotNull(hu, "hu is null");
Preconditions.checkNotNull(lockOwner, "lockOwner is null");
Preconditions.checkArgument(!lockOwner.isAnyOwner(), "%s not allowed", lockOwner);
final int huId = hu.getM_HU_ID();
unlock0(huId, lockOw... | Services.get(ILockManager.class)
.unlock()
.setOwner(lockOwner)
.setRecordsByModels(hus)
.release();
if (isUseVirtualColumn())
{
InterfaceWrapperHelper.refresh(hus);
}
}
@Override
public IQueryFilter<I_M_HU> isLockedFilter()
{
return Services.get(ILockManager.class).getLockedByFilter(I_... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HULockBL.java | 1 |
请完成以下Java代码 | public class HUPackingAwareCopy
{
public static HUPackingAwareCopy from(final IHUPackingAware from)
{
return new HUPackingAwareCopy(from);
}
private final IHUPackingAware from;
private boolean overridePartner = true;
public enum ASICopyMode
{
Clone, CopyID
}
private ASICopyMode asiCopyMode = ASICopyMode... | }
else if (asiCopyMode == ASICopyMode.CopyID)
{
to.setM_AttributeSetInstance_ID(asiId.getRepoId());
}
else
{
throw new IllegalStateException("Unknown asiCopyMode: " + asiCopyMode);
}
}
private void copyBPartner(final IHUPackingAware to)
{
// 08276
// do not modify the partner in the orderline ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\HUPackingAwareCopy.java | 1 |
请完成以下Java代码 | public void setPassword(String password) {
this.password = password;
}
public List<Role> getRoles() {
return roles;
}
public void setRoles(List<Role> roles) {
this.roles = roles;
}
// 下面为实现UserDetails而需要的重写方法!
@Override
public boolean isAccountNonExpired() {
... | List<GrantedAuthority> authorities = new ArrayList<>();
for (Role role : roles) {
authorities.add( new SimpleGrantedAuthority( role.getName() ) );
}
return authorities;
}
@Override
public String getUsername() {
return username;
}
@Override
public Str... | repos\Spring-Boot-In-Action-master\springbt_security_jwt\src\main\java\cn\codesheep\springbt_security_jwt\model\entity\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setFilename(@Nullable String filename) {
this.filename = filename;
}
public @Nullable String getFileDateFormat() {
return this.fileDateFormat;
}
public void setFileDateFormat(@Nullable String fileDateFormat) {
this.fileDateFormat = fileDateFormat;
}
public int getRetentionPeriod() {
... | * enabled.
*/
private Integer max = 200;
/**
* Minimum number of threads. Doesn't have an effect if virtual threads are
* enabled.
*/
private Integer min = 8;
/**
* Maximum capacity of the thread pool's backing queue. A default is computed
* based on the threading configuration.
*/
priv... | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\autoconfigure\JettyServerProperties.java | 2 |
请完成以下Java代码 | private void extractFromStream(ZipInputStream zipStream, boolean overwrite, File outputDirectory)
throws IOException {
ZipEntry entry = zipStream.getNextEntry();
String canonicalOutputPath = outputDirectory.getCanonicalPath() + File.separator;
while (entry != null) {
File file = new File(outputDirectory, en... | File outputFile = new File(output);
if (outputFile.exists()) {
if (!overwrite) {
throw new ReportableException(
"File '" + outputFile.getName() + "' already exists. Use --force if you want to "
+ "overwrite or specify an alternate location.");
}
if (!outputFile.delete()) {
throw new Rep... | repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\init\ProjectGenerator.java | 1 |
请完成以下Java代码 | public Object invoke(MethodInvocation invocation) throws Throwable {
if (isRefreshCall(invocation)) {
refresh();
return null;
}
if (isGetDelegateCall(invocation)) {
return getDelegate();
}
if (isGetPropertyCall(invocation)) {
return... | }
private boolean isGetDelegateCall(MethodInvocation invocation) {
return invocation.getMethod().getName().equals("getDelegate");
}
private boolean isRefreshCall(MethodInvocation invocation) {
return invocation.getMethod().getName().equals("refresh");
}
private boolean isGetProper... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\aop\EncryptablePropertySourceMethodInterceptor.java | 1 |
请完成以下Java代码 | public int getHR_Revenue_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_HR_Revenue_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Balancing.
@param IsBalancing
All transactions within an element value must balance (e.g. cost centers)
*/
public void setIsBalancing (boolean... | /** Get User List 1.
@return User defined list element #1
*/
public int getUser1_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_User1_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getUser2() throws RuntimeException
{
return (I_C_ValidCombination)MTable... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Concept_Acct.java | 1 |
请完成以下Java代码 | protected boolean afterSave(boolean newRecord, boolean success)
{
// Set Instance Attribute
if (!isInstanceAttribute())
{
String sql = "UPDATE M_AttributeSet mas"
+ " SET IsInstanceAttribute='Y' "
+ "WHERE M_AttributeSet_ID=" + getM_AttributeSet_ID()
+ " AND IsInstanceAttribute='N'"
+ " AN... | if (isInstanceAttribute())
{
String sql = "UPDATE M_AttributeSet mas"
+ " SET IsInstanceAttribute='N' "
+ "WHERE M_AttributeSet_ID=" + getM_AttributeSet_ID()
+ " AND IsInstanceAttribute='Y'"
+ " AND NOT EXISTS (SELECT * FROM M_AttributeUse mau"
+ " INNER JOIN M_Attribute ma ON (mau.M_Attri... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MAttributeSet.java | 1 |
请完成以下Java代码 | public AgentId getId() {
return this.id;
}
public String getVersion() {
return this.version;
}
/**
* Create an {@link Agent} based on the specified {@code User-Agent} header.
* @param userAgent the user agent
* @return an {@link Agent} instance or {@code null}
*/
public static Agent fromUserAgent(Str... | }
private static final class UserAgentHandler {
private static final Pattern TOOL_REGEX = Pattern.compile("([^\\/]*)\\/([^ ]*).*");
private static final Pattern STS_REGEX = Pattern.compile("STS (.*)");
private static final Pattern NETBEANS_REGEX = Pattern.compile("nb-springboot-plugin\\/(.*)");
static Age... | repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\support\Agent.java | 1 |
请完成以下Java代码 | public void onExit(CmmnActivityExecution execution) {
throw createIllegalStateTransitionException("exit", execution);
}
// occur /////////////////////////////////////////////////////////////////
public void onOccur(CmmnActivityExecution execution) {
ensureTransitionAllowed(execution, AVAILABLE, COMPLETE... | resuming(execution);
}
public void onParentResume(CmmnActivityExecution execution) {
throw createIllegalStateTransitionException("parentResume", execution);
}
// re-activation ////////////////////////////////////////////////////////
public void onReactivation(CmmnActivityExecution execution) {
thro... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\behavior\EventListenerOrMilestoneActivityBehavior.java | 1 |
请完成以下Java代码 | public class DataResponse<T> {
List<T> data;
long total;
int start;
String sort;
String order;
int size;
public List<T> getData() {
return data;
}
public DataResponse<T> setData(List<T> data) {
this.data = data;
return this;
}
public long getTotal(... | public void setSort(String sort) {
this.sort = sort;
}
public String getOrder() {
return order;
}
public void setOrder(String order) {
this.order = order;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;... | repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\api\DataResponse.java | 1 |
请完成以下Java代码 | public void composeDecisionResults(final ELExecutionContext executionContext) {
List<Map<String, Object>> ruleResults = new ArrayList<>(executionContext.getRuleResults().values());
boolean outputValuesPresent = false;
for (Map.Entry<String, List<Object>> entry : executionContext.getOutp... | // sort on predefined list(s) of output values
ruleResults.sort((o1, o2) -> {
CompareToBuilder compareToBuilder = new CompareToBuilder();
for (Map.Entry<String, List<Object>> entry : executionContext.getOutputValues().entrySet()) {
List<Object> outputValues = entry.getVal... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\hitpolicy\HitPolicyOutputOrder.java | 1 |
请完成以下Java代码 | class CollectionFilterer<T> implements Filterer<T> {
protected static final Log logger = LogFactory.getLog(CollectionFilterer.class);
private final Collection<T> collection;
private final Set<T> removeList;
CollectionFilterer(Collection<T> collection) {
this.collection = collection;
// We create a Set of ob... | this.collection.remove(removeIter.next());
}
logger.debug(LogMessage.of(() -> "Original collection contained " + originalSize + " elements; now contains "
+ this.collection.size() + " elements"));
return this.collection;
}
@Override
public Iterator<T> iterator() {
return this.collection.iterator();
}
... | repos\spring-security-main\access\src\main\java\org\springframework\security\acls\afterinvocation\CollectionFilterer.java | 1 |
请完成以下Java代码 | public void setAD_JavaClass_ID (final int AD_JavaClass_ID)
{
if (AD_JavaClass_ID < 1)
set_Value (COLUMNNAME_AD_JavaClass_ID, null);
else
set_Value (COLUMNNAME_AD_JavaClass_ID, AD_JavaClass_ID);
}
@Override
public int getAD_JavaClass_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_JavaClass_ID);
}
@Ov... | public int getAD_Sequence_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Sequence_ID);
}
@Override
public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@Override
public int g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_ComponentGenerator.java | 1 |
请完成以下Java代码 | public void setC_CompensationGroup_Schema_TemplateLine_ID (final int C_CompensationGroup_Schema_TemplateLine_ID)
{
if (C_CompensationGroup_Schema_TemplateLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_CompensationGroup_Schema_TemplateLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_CompensationGroup_Schema... | @Override
public void setIsHideWhenPrinting (final boolean IsHideWhenPrinting)
{
set_Value (COLUMNNAME_IsHideWhenPrinting, IsHideWhenPrinting);
}
@Override
public boolean isHideWhenPrinting()
{
return get_ValueAsBoolean(COLUMNNAME_IsHideWhenPrinting);
}
@Override
public void setM_Product_ID (final int M... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\order\model\X_C_CompensationGroup_Schema_TemplateLine.java | 1 |
请完成以下Java代码 | public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue()... | /** Get Key Layout.
@return Key Layout to be displayed when this key is pressed
*/
public int getSubKeyLayout_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SubKeyLayout_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Text.
@param Text Text */
public void setText (String Tex... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_POSKey.java | 1 |
请完成以下Java代码 | public boolean getBoolean(final String name, final boolean defaultValue)
{
Object value = UIManager.getDefaults().get(buildUIDefaultsKey(name));
if (value instanceof Boolean)
{
return (boolean)value;
}
if (uiSubClassID != null)
{
value = UIManager.getDefaults().get(name);
if (value instanceof Boo... | final Object keyOrig = keyValueList[i];
final Object value = keyValueList[i + 1];
final Object key;
if (keyOrig instanceof String)
{
key = buildUIDefaultsKey(uiSubClassID, (String)keyOrig);
}
else
{
key = keyOrig;
}
keyValueListConverted[i] = key;
keyValueListConverted[i + 1] = v... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\UISubClassIDHelper.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_C_ValidCombination getT_PayDiscount_Rev_A()
{
return get_ValueAsPO(COLUMNNAME_T_PayDiscount_Rev_Acct, org.compiere.model.I_C_ValidCombination.class);
}
@Override
public void setT_PayDiscount_Rev_A(org.compiere.model.I_C_ValidCombination T_PayDiscount_Rev_A)
{
set_ValueFromPO(COLUMN... | @Override
public int getT_Receivables_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_T_Receivables_Acct);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_C_ValidCombination getT_Revenue_A()
{
return get_ValueAsPO(COLUMNNAME_T_Revenue_Acct, org.compiere.m... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Tax_Acct.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserController {
@RequestMapping("/saveUser")
public void saveUser(@Valid User user, BindingResult result) {
System.out.println("user:"+user);
if(result.hasErrors()) {
List<ObjectError> list = result.getAllErrors();
for (ObjectError error : list) {
... | @RequestMapping("/getUsers")
public List<User> getUsers() {
List<User> users=new ArrayList<User>();
User user1=new User();
user1.setName("neo");
user1.setAge(30);
user1.setPass("neo123");
users.add(user1);
User user2=new User();
user2.setName("小明");
... | repos\spring-boot-leaning-master\2.x_data\1-2 Spring Boot 对 Web 开发的支持\spring-boot-web\src\main\java\com\neo\controller\UserController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
@Override
public String getBatchSearchKey() {
return batchSearchKey;
}
@Override
public void setBatchSearchKey(String batchSearchKey) {
this.batchSearchKey = batchSearchKey;
}
... | return null;
}
@Override
public void setBatchDocumentJson(String batchDocumentJson, String engineType) {
this.batchDocRefId = setByteArrayRef(this.batchDocRefId, BATCH_DOCUMENT_JSON_LABEL, batchDocumentJson, engineType);
}
@Override
public String getTenantId() {
return tenantId... | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\persistence\entity\BatchEntityImpl.java | 2 |
请完成以下Java代码 | public String getTextValue() {
return textValue;
}
public void setTextValue(String textValue) {
this.textValue = textValue;
}
public String getTextValue2() {
return textValue2;
}
public void setTextValue2(String textValue2) {
this.textValue2 = textValue2;
}
public byte[] getByteValue() {... | this.scopeActivityInstanceId = scopeActivityInstanceId;
}
public void setInitial(Boolean isInitial) {
this.isInitial = isInitial;
}
public Boolean isInitial() {
return isInitial;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[variableName=" + vari... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricVariableUpdateEventEntity.java | 1 |
请完成以下Java代码 | public String getGroupTypeAttribute() {
return groupTypeAttribute;
}
public void setGroupTypeAttribute(String groupTypeAttribute) {
this.groupTypeAttribute = groupTypeAttribute;
}
public boolean isAllowAnonymousLogin() {
return allowAnonymousLogin;
}
public void setAllowAnonymousLogin(boolean... | public void setAuthorizationCheckEnabled(boolean authorizationCheckEnabled) {
this.authorizationCheckEnabled = authorizationCheckEnabled;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public boolean isPasswordCheckC... | repos\camunda-bpm-platform-master\engine-plugins\identity-ldap\src\main\java\org\camunda\bpm\identity\impl\ldap\LdapConfiguration.java | 1 |
请完成以下Java代码 | public class ProcessDefinitionStatisticsQueryImpl extends AbstractQuery<ProcessDefinitionStatisticsQuery, ProcessDefinitionStatistics>
implements ProcessDefinitionStatisticsQuery {
protected static final long serialVersionUID = 1L;
protected boolean includeFailedJobs = false;
protected boolean includeIncidents... | public boolean isFailedJobsToInclude() {
return includeFailedJobs;
}
public boolean isIncidentsToInclude() {
return includeIncidents || includeRootIncidents || includeIncidentsForType != null;
}
protected void checkQueryOk() {
super.checkQueryOk();
if (includeIncidents && includeIncidentsForTy... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessDefinitionStatisticsQueryImpl.java | 1 |
请完成以下Java代码 | public boolean isSupportZoomInto() {return allowZoomInfo && widgetType.isSupportZoomInto();}
}
@Getter
private enum DisplayMode
{
DISPLAYED(true, false),
HIDDEN(false, false),
DISPLAYED_BY_SYSCONFIG(true, true),
HIDDEN_BY_SYSCONFIG(false, true),
;
private final boolean displayed;
private final boole... | {
this.displayed = displayed;
this.configuredBySysConfig = configuredBySysConfig;
}
}
@Value
@Builder
private static class ClassViewColumnLayoutDescriptor
{
@NonNull JSONViewDataType viewType;
DisplayMode displayMode;
int seqNo;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\annotation\ViewColumnHelper.java | 1 |
请完成以下Java代码 | public int hashCode() {
return Objects.hash(modelKey, tenantId);
}
}
protected static class CacheValue {
protected final String json;
protected final int version;
protected final String definitionId;
public CacheValue(String json, ChannelDefinition definiti... | protected final CacheKey cacheKey;
public ChannelRegistrationImpl(boolean registered, CacheRegisteredChannel previousChannel, CacheKey cacheKey) {
this.registered = registered;
this.previousChannel = previousChannel;
this.cacheKey = cacheKey;
}
@Override
... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\deployer\DefaultInboundChannelModelCacheManager.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getExcelPath() {
return excelPath;
}
public void setExcelPath(String excelPath) {
this.excelPath = excelPath;
}
public String getPicsUrlPrefix() {
return picsUrlPrefix;
}
public void setPicsUrlPrefix(String picsUrlPrefix) {
this.picsUrlPrefix = pi... | }
public String getFilesPath() {
return filesPath;
}
public void setFilesPath(String filesPath) {
this.filesPath = filesPath;
}
public Integer getHeartbeatTimeout() {
return heartbeatTimeout;
}
public void setHeartbeatTimeout(Integer heartbeatTimeout) {
th... | repos\SpringBootBucket-master\springboot-shiro\src\main\java\com\xncoding\pos\config\properties\MyProperties.java | 2 |
请完成以下Java代码 | public BigDecimal getPriceList ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceList);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set PO Price.
@param PricePO
Price based on a purchase order
*/
public void setPricePO (BigDecimal PricePO)
{
set_Value (COLUMNNAME_PricePO, Price... | /** Set UPC/EAN.
@param UPC
Bar Code (Universal Product Code or its superset European Article Number)
*/
public void setUPC (String UPC)
{
set_Value (COLUMNNAME_UPC, UPC);
}
/** Get UPC/EAN.
@return Bar Code (Universal Product Code or its superset European Article Number)
*/
public String getUPC ()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_PO.java | 1 |
请完成以下Java代码 | public abstract class AbstractSetJobsRetriesBatchCmd implements Command<Batch> {
protected int retries;
protected Date dueDate;
protected boolean isDueDateSet;
@Override
public Batch execute(CommandContext commandContext) {
BatchElementConfiguration elementConfiguration = collectJobIds(commandContext);
... | propertyChanges.add(new PropertyChange("retries", null, retries));
commandContext.getOperationLogManager()
.logJobOperation(UserOperationLogEntry.OPERATION_TYPE_SET_JOB_RETRIES,
null,
null,
null,
null,
null,
propertyChanges);
}
pr... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\AbstractSetJobsRetriesBatchCmd.java | 1 |
请完成以下Java代码 | public static class Builder
{
private IUserRolePermissions userRolePermissions;
private GridTab gridTab;
private Integer maxQueryRecordsPerTab = null;
private Builder()
{
super();
}
public final GridTabMaxRowsRestrictionChecker build()
{
return new GridTabMaxRowsRestrictionChecker(this);
}
... | public Builder setMaxQueryRecordsPerTab(final int maxQueryRecordsPerTab)
{
this.maxQueryRecordsPerTab = maxQueryRecordsPerTab;
return this;
}
private int getMaxQueryRecordsPerTab()
{
if (maxQueryRecordsPerTab != null)
{
return maxQueryRecordsPerTab;
}
else if (gridTab != null)
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\GridTabMaxRowsRestrictionChecker.java | 1 |
请完成以下Java代码 | public void setPayAmt (final BigDecimal PayAmt)
{
set_Value (COLUMNNAME_PayAmt, PayAmt);
}
@Override
public BigDecimal getPayAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PayAmt);
return bd != null ? bd : BigDecimal.ZERO;
}
/**
* PaymentRule AD_Reference_ID=195
* Reference name: _P... | @Override
public void setPaymentRule (final java.lang.String PaymentRule)
{
set_Value (COLUMNNAME_PaymentRule, PaymentRule);
}
@Override
public java.lang.String getPaymentRule()
{
return get_ValueAsString(COLUMNNAME_PaymentRule);
}
@Override
public void setReference (final @Nullable java.lang.String Ref... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaySelectionLine.java | 1 |
请完成以下Java代码 | public CurrencyId getCurrencyId() {return amt.getCurrencyId();}
public UomId getUomId() {return qty.getUomId();}
public boolean isZero() {return amt.isZero() && qty.isZero();}
public CostAmountAndQty toZero() {return isZero() ? this : of(amt.toZero(), qty.toZero());}
public CostAmountAndQty negate() {return isZ... | public CostAmountAndQty add(@NonNull final CostAmountAndQty other)
{
if (other.isZero())
{
return this;
}
else if (this.isZero())
{
return other;
}
else
{
return of(this.amt.add(other.amt), this.qty.add(other.qty));
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostAmountAndQty.java | 1 |
请完成以下Java代码 | public class Addition implements CalculatorOperation {
private double left;
private double right;
private double result = 0.0;
public Addition(double left, double right) {
this.left = left;
this.right = right;
}
public double getLeft() {
return left;
}
public v... | this.right = right;
}
public double getResult() {
return result;
}
public void setResult(double result) {
this.result = result;
}
@Override
public void perform() {
result = left + right;
}
} | repos\tutorials-master\patterns-modules\solid\src\main\java\com\baeldung\o\Addition.java | 1 |
请完成以下Java代码 | public LocalDate getDocumentDate()
{
return TimeUtil.asLocalDate(getStatementDate());
}
/**
* Get Process Message
*
* @return clear text error message
*/
@Override
public String getProcessMsg()
{
return m_processMsg;
} // getProcessMsg
/**
* Get Document Owner (Responsible)
*
* @return AD_... | @Override
public BigDecimal getApprovalAmt()
{
return getStatementDifference();
} // getApprovalAmt
/**
* Get Currency
*
* @return Currency
*/
@Override
public int getC_Currency_ID()
{
return getCashBook().getC_Currency_ID();
} // getC_Currency_ID
/**
* Document Status is Complete or Closed
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MCash.java | 1 |
请完成以下Java代码 | public List<I_M_Source_HU> retrieveMatchingSourceHuMarkers(@NonNull final MatchingSourceHusQuery query)
{
return sourceHuDAO.retrieveActiveSourceHuMarkers(query);
}
@NonNull
public ImmutableList<I_M_Source_HU> retrieveSourceHuMarkers(@NonNull final Collection<HuId> huIds)
{
return sourceHuDAO.retrieveSourceHu... | @Immutable
public static class MatchingSourceHusQuery
{
/**
* Query for HUs that have any of the given product IDs. Empty means that no HUs will be found.
*/
@Singular
ImmutableSet<ProductId> productIds;
@Singular
ImmutableSet<WarehouseId> warehouseIds;
public static MatchingSourceHusQuery fromHuI... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\sourcehu\SourceHUsService.java | 1 |
请完成以下Java代码 | public final String getTableName() {return po.get_TableName();}
@Override
public final int getId() {return po.get_ID();}
@Override
public TableRecordReference getRecordRef() {return TableRecordReference.of(po.get_TableName(), po.get_ID());}
@Override
public ClientId getClientId()
{
return ClientId.ofRepoId(... | {
return null;
}
final Object valueObj = po.get_Value(index);
final Integer valueInt = NumberUtils.asInteger(valueObj, null);
if (valueInt == null)
{
return null;
}
return idOrNullMapper.apply(valueInt);
}
@Override
@Nullable
public LocalDateAndOrgId getValueAsLocalDateOrNull(@NonNull final S... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\doc\POAcctDocModel.java | 1 |
请完成以下Java代码 | public T readConfiguration(byte[] serializedConfiguration) {
return getJsonConverterInstance().toObject(JsonUtil.asObject(serializedConfiguration));
}
protected abstract AbstractBatchConfigurationObjectConverter<T> getJsonConverterInstance();
@Override
public Class<? extends DbEntity> getEntityType() {
... | return OptimisticLockingResult.THROW;
}
@Override
public int calculateInvocationsPerBatchJob(String batchType, T configuration) {
ProcessEngineConfigurationImpl engineConfig = Context.getProcessEngineConfiguration();
Map<String, Integer> invocationsPerBatchJobByBatchType = engineConfig.getInvocationsPerB... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\AbstractBatchJobHandler.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_M_Allergen getM_Allergen()
{
return get_ValueAsPO(COLUMNNAME_M_Allergen_ID, org.compiere.model.I_M_Allergen.class);
}
@Override
public void setM_Allergen(final org.compiere.model.I_M_Allergen M_Allergen)
{
set_ValueFromPO(COLUMNNAME_M_Allergen_ID, org.compiere.model.I_M_Allergen.cl... | return get_ValueAsInt(COLUMNNAME_M_Allergen_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);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Allergen_Trl.java | 1 |
请完成以下Java代码 | public void recalculateDuedate(boolean creationDateBased) {
try {
ManagementService managementService = engine.getManagementService();
managementService.recalculateJobDuedate(jobId, creationDateBased);
} catch (AuthorizationException e) {
throw e;
} catch(NotFoundException e) {// rewrite s... | ManagementService managementService = engine.getManagementService();
managementService.setJobPriority(jobId, dto.getPriority());
} catch (AuthorizationException e) {
throw e;
} catch (NotFoundException e) {
throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage());
} catch (Proce... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\runtime\impl\JobResourceImpl.java | 1 |
请完成以下Java代码 | public class ImagePreview extends JComponent
implements PropertyChangeListener {
ImageIcon thumbnail = null;
File file = null;
public ImagePreview(JFileChooser fc) {
setPreferredSize(new Dimension(100, 50));
setBorder(new TitledBorder(BorderFactory.createEtchedBord... | loadImage();
repaint();
}
}
}
public void paintComponent(Graphics g) {
if (thumbnail == null) {
loadImage();
}
if (thumbnail != null) {
int x = getWidth()/2 - thumbnail.getIconWidth()/2;
int y = getHeight()/2 - thum... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\filechooser\ImagePreview.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookService {
@Autowired
private BookRepository bookRepository;
public List<Book> findAllBooks() {
return bookRepository.findAll();
}
public Book findBookById(Long bookId) {
return bookRepository.findById(bookId)
.orElseThrow(() -> new BookNotFoundExceptio... | book.setAuthor(updates.get(key));
break;
case "title":
book.setTitle(updates.get(key));
}
});
return bookRepository.save(book);
}
@Transactional(propagation = Propagation.REQUIRED)
public Book updateBook(Book book, ... | repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\zipkin-log-svc-book\src\main\java\com\baeldung\spring\cloud\bootstrap\svcbook\book\BookService.java | 2 |
请完成以下Java代码 | protected void afterInOutProcessed(final org.compiere.model.I_M_InOut inout)
{
huInOutBL.setAssignedHandlingUnits(inout, getHUsReturned());
}
@Override
public boolean isEmpty()
{
// only empty if there are no product lines.
return inoutLinesBuilder.isEmpty();
}
@Override
public IReturnsInOutProducer add... | public void addHUToReturn(@NonNull final I_M_HU hu, @NonNull final InOutLineId originalShipmentLineId)
{
_husToReturn.add(new HUToReturn(hu, originalShipmentLineId));
}
@Value
private static class HUToReturn
{
@NonNull I_M_HU hu;
@NonNull InOutLineId originalShipmentLineId;
private int getM_HU_ID()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\customer\CustomerReturnsInOutProducer.java | 1 |
请完成以下Java代码 | public String login(int arg0, int arg1, int arg2)
{
return null;
}
@Override
public String modelChange(PO arg0, int arg1) throws Exception
{
return null;
}
private String sendEMail(final MADBoilerPlate text, final MInOut io, final I_AD_User orderUser)
{
final Properties ctx = Env.getCtx();
MADBoilerPl... | }
EMail email = client.createEMail(
to,
text.getName(),
message,
true);
if (email == null)
{
throw new AdempiereException("Cannot create email. Check log.");
}
while (st.hasMoreTokens())
{
email.addTo(EMailAddress.ofString(st.nextToken()));
}
send(email)... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\model\validator\ShipperTransportationMailNotification.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ExternalSystemConfigQRCode
{
@NonNull IExternalSystemChildConfigId childConfigId;
public static boolean equals(@Nullable final ExternalSystemConfigQRCode o1, @Nullable final ExternalSystemConfigQRCode o2)
{
return Objects.equals(o1, o2);
}
public String toGlobalQRCodeJsonString() {return ExternalS... | .bottomText(getCaption())
.build();
}
@NonNull
public String getCaption()
{
return childConfigId.getType() + "-" + childConfigId.getRepoId();
}
public static boolean isTypeMatching(@NonNull final GlobalQRCode globalQRCode)
{
return ExternalSystemConfigQRCodeJsonConverter.isTypeMatching(globalQRCode);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\config\qrcode\ExternalSystemConfigQRCode.java | 2 |
请完成以下Java代码 | public Collection<ConfigAttribute> getAllConfigAttributes() {
Set<ConfigAttribute> set = new HashSet<>();
for (MethodSecurityMetadataSource s : this.methodSecurityMetadataSources) {
Collection<ConfigAttribute> attrs = s.getAllConfigAttributes();
if (attrs != null) {
set.addAll(attrs);
}
}
return se... | public boolean equals(Object other) {
DefaultCacheKey otherKey = (DefaultCacheKey) other;
return (this.method.equals(otherKey.method)
&& ObjectUtils.nullSafeEquals(this.targetClass, otherKey.targetClass));
}
@Override
public int hashCode() {
return this.method.hashCode() * 21 + ((this.targetClass !... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\method\DelegatingMethodSecurityMetadataSource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JpaApiUsageStateDao extends JpaAbstractDao<ApiUsageStateEntity, ApiUsageState> implements ApiUsageStateDao {
private final ApiUsageStateRepository apiUsageStateRepository;
public JpaApiUsageStateDao(ApiUsageStateRepository apiUsageStateRepository) {
this.apiUsageStateRepository = apiUsage... | public void deleteApiUsageStateByEntityId(EntityId entityId) {
apiUsageStateRepository.deleteByEntityIdAndEntityType(entityId.getId(), entityId.getEntityType().name());
}
@Override
public PageData<ApiUsageState> findAllByTenantId(TenantId tenantId, PageLink pageLink) {
return DaoUtil.toPage... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\usagerecord\JpaApiUsageStateDao.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ArrayOfPatients extends ArrayList<Patient> {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
retur... | StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfPatients {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first l... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\ArrayOfPatients.java | 2 |
请完成以下Java代码 | public class ParamFlowRuleEntity extends AbstractRuleEntity<ParamFlowRule> {
public ParamFlowRuleEntity() {
}
public ParamFlowRuleEntity(ParamFlowRule rule) {
AssertUtil.notNull(rule, "Authority rule should not be null");
this.rule = rule;
}
public static ParamFlowRuleEntity fromA... | }
@JsonIgnore
@JSONField(serialize = false)
public int getMaxQueueingTimeMs() {
return rule.getMaxQueueingTimeMs();
}
@JsonIgnore
@JSONField(serialize = false)
public int getBurstCount() {
return rule.getBurstCount();
}
@JsonIgnore
@JSONField(serialize = false)... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\rule\ParamFlowRuleEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected GenericEventSubscriptionEntity insertGenericEvent(EventSubscriptionBuilder eventSubscriptionBuilder) {
GenericEventSubscriptionEntity eventSubscription = createGenericEventSubscription();
eventSubscription.setEventType(eventSubscriptionBuilder.getEventType());
eventSubscription.setEven... | return eventSubscription;
}
protected List<SignalEventSubscriptionEntity> toSignalEventSubscriptionEntityList(List<EventSubscriptionEntity> result) {
List<SignalEventSubscriptionEntity> signalEventSubscriptionEntities = new ArrayList<>(result.size());
for (EventSubscriptionEntity eventSubscript... | repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\impl\persistence\entity\EventSubscriptionEntityManagerImpl.java | 2 |
请完成以下Java代码 | public class ColorConverter extends CompositeConverter<ILoggingEvent> {
private static final Map<String, AnsiElement> ELEMENTS;
static {
Map<String, AnsiElement> ansiElements = new HashMap<>();
Arrays.stream(AnsiColor.values())
.filter((color) -> color != AnsiColor.DEFAULT)
.forEach((color) -> ansiElement... | AnsiElement color = ELEMENTS.get(getFirstOption());
if (color == null) {
// Assume highlighting
color = LEVELS.get(event.getLevel().toInteger());
color = (color != null) ? color : AnsiColor.GREEN;
}
return toAnsiString(in, color);
}
protected String toAnsiString(String in, AnsiElement element) {
ret... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\logback\ColorConverter.java | 1 |
请完成以下Java代码 | public boolean isWarnEnabled() {
return delegateLogger.isWarnEnabled();
}
/**
* @return true if the logger will log 'ERROR' messages
*/
public boolean isErrorEnabled() {
return delegateLogger.isErrorEnabled();
}
/**
* Formats a message template
*
* @param id the id of the message
*... | *
* @return the prepared exception message
*/
protected String exceptionMessage(String id, String messageTemplate, Object... parameters) {
String formattedTemplate = formatMessageTemplate(id, messageTemplate);
if(parameters == null || parameters.length == 0) {
return formattedTemplate;
} else... | repos\camunda-bpm-platform-master\commons\logging\src\main\java\org\camunda\commons\logging\BaseLogger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Location {
private String city;
private String country;
@Id
private Long id;
@OneToMany(cascade = CascadeType.ALL)
@JoinColumn(name = "LOCATION_ID")
private List<Store> stores = new ArrayList<>();
public String getCity() {
return city;
}
public String get... | public List<Store> getStores() {
return stores;
}
public void setCity(String city) {
this.city = city;
}
public void setCountry(String country) {
this.country = country;
}
public void setId(Long id) {
this.id = id;
}
public void setStores(List<Store> s... | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-2\src\main\java\com\baeldung\boot\domain\Location.java | 2 |
请完成以下Java代码 | public class CacheReloadIfTrueParamDescriptor implements ICachedMethodPartDescriptor
{
private final int parameterIndex;
public CacheReloadIfTrueParamDescriptor(final Class<?> parameterType, final int parameterIndex, final Annotation annotation)
{
super();
this.parameterIndex = parameterIndex;
if (Boolean.c... | throw new CacheIntrospectionException("Parameter has unsupported type")
.setParameter(parameterIndex, parameterType);
}
}
@Override
public void extractKeyParts(final CacheKeyBuilder keyBuilder, final Object targetObject, final Object[] params)
{
final Boolean cacheReloadFlagObj = (Boolean)params[parameter... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheReloadIfTrueParamDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public IAutoCloseable newContext()
{
return HUContextHolder.temporarySet(handlingUnitsBL.createMutableHUContextForProcessing());
}
public ProductId getSingleProductId(@NonNull final HUQRCode huQRCode)
{
final HuId huId = huQRCodesService.getHuIdByQRCode(huQRCode);
return getSingleHUProductStorage(huId).getPr... | final IHUStorageFactory storageFactory = handlingUnitsBL.getStorageFactory();
return Optional.ofNullable(storageFactory.getStorage(hu).getProductStorageOrNull(productId));
}
public void assetHUContainsProduct(@NonNull final HUQRCode huQRCode, @NonNull final ProductId productId)
{
final HuId huId = huQRCodesServ... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\external_services\hu\DistributionHUService.java | 2 |
请完成以下Java代码 | public void setFrom_Product_ID (final int From_Product_ID)
{
if (From_Product_ID < 1)
set_Value (COLUMNNAME_From_Product_ID, null);
else
set_Value (COLUMNNAME_From_Product_ID, From_Product_ID);
}
@Override
public int getFrom_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_From_Product_ID);
}
@Ov... | @Override
public void setM_Maturing_Configuration(final org.compiere.model.I_M_Maturing_Configuration M_Maturing_Configuration)
{
set_ValueFromPO(COLUMNNAME_M_Maturing_Configuration_ID, org.compiere.model.I_M_Maturing_Configuration.class, M_Maturing_Configuration);
}
@Override
public void setM_Maturing_Configur... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Maturing_Configuration_Line.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getContractNumber() {
return contractNumber;
}
/**
* Sets the value of the contractNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setContractNumber(String value) {
this.contractNumber = ... | public Boolean isNonReturnableContainer() {
return nonReturnableContainer;
}
/**
* Sets the value of the nonReturnableContainer property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setNonReturnableContainer(Boolean value... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\INVOICListLineItemExtensionType.java | 2 |
请完成以下Java代码 | public Function<RateLimitConfig, BucketConfiguration> getConfigurationBuilder() {
return configurationBuilder;
}
public void setConfigurationBuilder(Function<RateLimitConfig, BucketConfiguration> configurationBuilder) {
Objects.requireNonNull(configurationBuilder, "configurationBuilder may not be null");
... | return this;
}
public int getTokens() {
return tokens;
}
public RateLimitConfig setTokens(int tokens) {
Assert.isTrue(tokens > 0, "tokens must be greater than zero");
this.tokens = tokens;
return this;
}
public String getHeaderName() {
return headerName;
}
public RateLimitConfig setHe... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\Bucket4jFilterFunctions.java | 1 |
请完成以下Java代码 | public static BPGroupId ofRepoIdOrNull(final int repoId)
{
if (repoId == STANDARD.repoId)
{
return STANDARD;
}
else if (repoId <= 0)
{
return null;
}
else
{
return new BPGroupId(repoId);
}
}
public static Optional<BPGroupId> optionalOfRepoId(final int repoId) {return Optional.ofNullable(o... | public static int toRepoId(@Nullable final BPGroupId bpGroupId)
{
return bpGroupId != null ? bpGroupId.getRepoId() : -1;
}
@JsonValue
public int toJson()
{
return getRepoId();
}
public static boolean equals(@Nullable final BPGroupId o1, @Nullable final BPGroupId o2)
{
return Objects.equals(o1, o2);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPGroupId.java | 1 |
请完成以下Java代码 | private void checkProductById(@NonNull final I_M_Product product)
{
if (!product.isBOM())
{
log.info("Product is not a BOM");
// No BOM - should not happen, but no problem
return;
}
// Check this level
checkProductBOMCyclesAndMarkAsVerified(product);
// Get Default BOM from this product
final ... | {
final ProductId productId = ProductId.ofRepoId(tbomline.getM_Product_ID());
final I_M_Product bomLineProduct = productBL.getById(productId);
checkProductBOMCyclesAndMarkAsVerified(bomLineProduct);
}
}
private void checkProductBOMCyclesAndMarkAsVerified(final I_M_Product product)
{
final ProductId pro... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\PP_Product_BOM_Check.java | 1 |
请完成以下Java代码 | public final class ALoginRes_zh extends ListResourceBundle
{
/** Translation Content */
static final Object[][] contents = new String[][]
{
{ "Connection", "\u9023\u7dda" },
{ "Defaults", "\u9810\u8a2d\u503c" },
{ "Login", "ADempiere \u767b\u5165" },
{ "File", "\u... | { "UserPwdError", "\u5e33\u865f\u5bc6\u78bc\u4e0d\u6b63\u78ba" },
{ "RoleNotFound", "\u6c92\u6709\u9019\u89d2\u8272" },
{ "Authorized", "\u5df2\u6388\u6b0a" },
{ "Ok", "\u78ba\u5b9a" },
{ "Cancel", "\u53d6\u6d88" },
{ "VersionConflict", "\u7248\u672c\u885d\u7a81:"... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\apps\ALoginRes_zh.java | 1 |
请完成以下Java代码 | public Integer getUid() {
return uid;
}
public void setUid(Integer uid) {
this.uid = uid;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getName() {
return... | public byte getState() {
return state;
}
public void setState(byte state) {
this.state = state;
}
public List<SysRole> getRoleList() {
return roleList;
}
public void setRoleList(List<SysRole> roleList) {
this.roleList = roleList;
}
/**
* Salt
... | repos\springboot-demo-master\shiro\src\main\java\com\et\shiro\entity\UserInfo.java | 1 |
请完成以下Java代码 | public static String concatenateUsingStringConcat(String[] values) {
String result = "";
for (String value : values) {
result = result.concat(getNonNullString(value));
}
return result;
}
public static String concatenateUsingCollectorsJoining(String[] values) {
... | public static String concatenateUsingHelperMethod(String[] values) {
String result = "";
for (String value : values) {
result = result + getNonNullString(value);
}
return result;
}
public static String concatenateUsingPlusOperator(String[] values) {
String ... | repos\tutorials-master\core-java-modules\core-java-string-operations-4\src\main\java\com\baeldung\concatenation\ConcatenatingNull.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class DefaultGraphQlSchemaCondition extends SpringBootCondition implements ConfigurationCondition {
@Override
public ConfigurationCondition.ConfigurationPhase getConfigurationPhase() {
return ConfigurationCondition.ConfigurationPhase.REGISTER_BEAN;
}
@Override
public ConditionOutcome getMatchOutcome(ConditionC... | match = true;
messages.add(message.found("GraphQlSource").items(Arrays.asList(graphQlSourceBeanNames)));
}
else {
messages.add((message.didNotFind("GraphQlSource").atAll()));
}
return new ConditionOutcome(match, ConditionMessage.of(messages));
}
private List<Resource> resolveSchemaResources(ResourcePat... | repos\spring-boot-4.0.1\module\spring-boot-graphql\src\main\java\org\springframework\boot\graphql\autoconfigure\DefaultGraphQlSchemaCondition.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public DmnDeploymentBuilder tenantId(String tenantId) {
deployment.setTenantId(tenantId);
return this;
}
@Override
public DmnDeploymentBuilder parentDeploymentId(String parentDeploymentId) {
deployment.setParentDeploymentId(parentDeploymentId);
return this;
}
@Overr... | }
// getters and setters
// //////////////////////////////////////////////////////
public DmnDeploymentEntity getDeployment() {
return deployment;
}
public boolean isDmnXsdValidationEnabled() {
return isDmn20XsdValidationEnabled;
}
public boolean isDuplicateFilterEnabled(... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\repository\DmnDeploymentBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class StockChangeDetailQuery
{
@Nullable
public static StockChangeDetailQuery ofStockChangeDetailOrNull(
@Nullable final StockChangeDetail stockChangeDetail)
{
if (stockChangeDetail == null)
{
return null;
}
return StockChangeDetailQuery.builder()
.freshQuantityOnHandRepoId(stockChangeDetai... | .createQueryBuilder(I_MD_Candidate_StockChange_Detail.class)
.addOnlyActiveRecordsFilter();
final Integer computedFreshQtyOnHandId = NumberUtils.asInteger(getFreshQuantityOnHandRepoId(), -1);
if (computedFreshQtyOnHandId > 0)
{
stockChangeDetailSubQueryBuilder.addEqualsFilter(I_MD_Candidate_StockChange_De... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\query\StockChangeDetailQuery.java | 2 |
请完成以下Java代码 | public static void main(String[] args) {
SpringApplication.run(SpringBoot2JdbcWithH2Application.class, args);
}
@Override
public void run(String... args) {
LOGGER.info("WITH JDBC TEMPLATE APPROACH...");
LOGGER.info("Student id 10001 -> {}", repository.findById(10001L));
L... | // repository.findAll().forEach(student -> System.out.println(student.toJSON()));
LOGGER.info("WITH JDBC CLIENT APPROACH...");
LOGGER.info("Student id 10001 -> {}", jdbcClientRepository.findById(10001L));
LOGGER.info("Inserting -> {}", jdbcClientRepository.insert(new Student(10011L, "Ranga", ... | repos\spring-boot-examples-master\spring-boot-2-jdbc-with-h2\src\main\java\com\in28minutes\springboot\jdbc\h2\example\SpringBoot2JdbcWithH2Application.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setContent(String value) {
this.content = value;
}
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <co... | * Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the link property.
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\AttachmentsType.java | 2 |
请完成以下Java代码 | public class InOutDocumentLocationAdapterFactory implements DocumentLocationAdapterFactory
{
public static DocumentLocationAdapter locationAdapter(@NonNull final I_M_InOut delegate)
{
return new DocumentLocationAdapter(delegate);
}
public static DocumentDeliveryLocationAdapter deliveryLocationAdapter(@NonNull fi... | @Override
public Optional<IDocumentDeliveryLocationAdapter> getDocumentDeliveryLocationAdapter(final Object record)
{
return toInOut(record).map(InOutDocumentLocationAdapterFactory::deliveryLocationAdapter);
}
@Override
public Optional<IDocumentHandOverLocationAdapter> getDocumentHandOverLocationAdapter(final O... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\location\adapter\InOutDocumentLocationAdapterFactory.java | 1 |
请完成以下Java代码 | public <T extends CoreExecution> void performOperation(CoreAtomicOperation<T> operation) {
LOG.debugPerformingAtomicOperation(operation, this);
operation.execute((T) this);
}
@SuppressWarnings("unchecked")
public <T extends CoreExecution> void performOperationSync(CoreAtomicOperation<T> operation) {
... | }
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public boolean isSkipCustomListeners() {
return skipCustomListeners;
}
public void setSkipCustomListeners(boolean skipCustomListeners) {
this.skipCustomListeners = ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\instance\CoreExecution.java | 1 |
请完成以下Java代码 | protected void addConditionalStartEventSubscription(EventSubscriptionDeclaration conditionalEventDefinition, ProcessDefinitionEntity processDefinition) {
EventSubscriptionEntity newSubscription = conditionalEventDefinition.createSubscriptionForStartEvent(processDefinition);
newSubscription.insert();
}
enu... | return getCommandContext().getJobDefinitionManager();
}
protected EventSubscriptionManager getEventSubscriptionManager() {
return getCommandContext().getEventSubscriptionManager();
}
protected ProcessDefinitionManager getProcessDefinitionManager() {
return getCommandContext().getProcessDefinitionManag... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\deployer\BpmnDeployer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DefaultDeviceAuthService implements DeviceAuthService {
private final DeviceService deviceService;
private final DeviceCredentialsService deviceCredentialsService;
public DefaultDeviceAuthService(DeviceService deviceService, DeviceCredentialsService deviceCredentialsService) {
this.d... | // Credentials ID matches Credentials value in this
// primitive case;
return DeviceAuthResult.of(credentials.getDeviceId());
case X509_CERTIFICATE:
return DeviceAuthResult.of(credentials.getDeviceId());
case... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\device\DefaultDeviceAuthService.java | 2 |
请完成以下Java代码 | public class DefaultApplicationArguments implements ApplicationArguments {
private final Source source;
private final String[] args;
public DefaultApplicationArguments(String... args) {
Assert.notNull(args, "'args' must not be null");
this.source = new Source(args);
this.args = args;
}
@Override
public ... | }
private static class Source extends SimpleCommandLinePropertySource {
Source(String[] args) {
super(args);
}
@Override
public List<String> getNonOptionArgs() {
return super.getNonOptionArgs();
}
@Override
public @Nullable List<String> getOptionValues(String name) {
return super.getOptionVa... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\DefaultApplicationArguments.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public long findBatchPartCountByQueryCriteria(BatchPartQuery batchPartQuery) {
return dataManager.findBatchPartCountByQueryCriteria((BatchPartQueryImpl) batchPartQuery);
}
@Override
public BatchPartEntity createBatchPart(BatchEntity parentBatch, String status, String scopeId, String subScopeId, Str... | batchPartEntity.setCompleteTime(getClock().getCurrentTime());
batchPartEntity.setStatus(status);
batchPartEntity.setResultDocumentJson(resultJson, serviceConfiguration.getEngineName());
return batchPartEntity;
}
@Override
public void deleteBatchPartEntityAndResources(BatchP... | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\persistence\entity\BatchPartEntityManagerImpl.java | 2 |
请完成以下Java代码 | public class BufferedReaderExample {
public String readAllLines(BufferedReader reader) throws IOException {
StringBuilder content = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
content.append(line);
content.append(System.lineSeparat... | result = "";
}
return result;
}
public String readFile() {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader("src/main/resources/input.txt"));
String content = readAllLines(reader);
return content;
} catch... | repos\tutorials-master\core-java-modules\core-java-io-apis\src\main\java\com\baeldung\bufferedreader\BufferedReaderExample.java | 1 |
请完成以下Java代码 | public DmnHitPolicyHandler getHitPolicyHandler() {
return hitPolicyHandler;
}
public void setHitPolicyHandler(DmnHitPolicyHandler hitPolicyHandler) {
this.hitPolicyHandler = hitPolicyHandler;
}
public List<DmnDecisionTableInputImpl> getInputs() {
return inputs;
}
public void setInputs(List<Dm... | this.outputs = outputs;
}
public List<DmnDecisionTableRuleImpl> getRules() {
return rules;
}
public void setRules(List<DmnDecisionTableRuleImpl> rules) {
this.rules = rules;
}
@Override
public String toString() {
return "DmnDecisionTableImpl{" +
" hitPolicyHandler=" + hitPolicyHandler... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionTableImpl.java | 1 |
请完成以下Java代码 | default boolean getFieldValueAsBoolean(@NonNull final String fieldName, final boolean defaultValueIfNotFoundOrError)
{
return getFieldNameAndJsonValues().getAsBoolean(fieldName, defaultValueIfNotFoundOrError);
}
default Object getFieldValueAsJsonObject(@NonNull final String fieldName, final JSONOptions jsonOpts)
... | default IViewRowAttributes getAttributes() { throw new EntityNotFoundException("Row does not support attributes"); }
// @formatter:on
//
// IncludedView
// @formatter:off
default ViewId getIncludedViewId() { return null; }
// @formatter:on
//
// Single column row
// @formatter:off
/** @return true if fronte... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\IViewRow.java | 1 |
请完成以下Java代码 | private static BigDecimal toBigDecimalOr(@Nullable final Quantity quantity, @Nullable final BigDecimal defaultValue)
{
if (quantity == null)
{
return defaultValue;
}
return quantity.toBigDecimal();
}
public static class QuantityDeserializer extends StdDeserializer<Quantity>
{
private static final long... | public void serialize(final Quantity value, final JsonGenerator gen, final SerializerProvider provider) throws IOException
{
gen.writeStartObject();
final String qtyStr = value.toBigDecimal().toString();
final int uomId = value.getUomId().getRepoId();
gen.writeFieldName("qty");
gen.writeString(qtyStr... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\Quantitys.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String retentionPolicy() {
return get(InfluxProperties::getRetentionPolicy, InfluxConfig.super::retentionPolicy);
}
@Override
public @Nullable Integer retentionReplicationFactor() {
return get(InfluxProperties::getRetentionReplicationFactor, InfluxConfig.super::retentionReplicationFactor);
}
... | @Override
public @Nullable String org() {
return get(InfluxProperties::getOrg, InfluxConfig.super::org);
}
@Override
public String bucket() {
return obtain(InfluxProperties::getBucket, InfluxConfig.super::bucket);
}
@Override
public @Nullable String token() {
return get(InfluxProperties::getToken, Influx... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\influx\InfluxPropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public boolean isLessThanOrEqualTo(final int other)
{
return isLimited() && value <= other;
}
public boolean isLimitHitOrExceeded(@NonNull final Collection<?> collection)
{
return isLimitHitOrExceeded(collection.size());
}
public boolean isLimitHitOrExceeded(@NonNull final MutableInt countHolder)
{
retur... | if (isNoLimit() || collection.isEmpty())
{
return this;
}
else
{
final int collectionSize = collection.size();
final int newLimitInt = value - collectionSize;
if (newLimitInt <= 0)
{
throw new AdempiereException("Invalid collection size. It shall be less than " + value + " but it was " + coll... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\QueryLimit.java | 1 |
请完成以下Java代码 | public void removeAllElements()
{
super.removeAllElements();
clear();
} // removeAllElements
private void clear()
{
// if (m_lookup != null)
// {
// m_lookup.clear();
// }
if (m_lookupDirect != null)
{
m_lookupDirect.clear();
}
}
static ArrayKey createValidationKey(final IValidationConte... | public MLookupInfo getLookupInfo()
{
return m_info;
}
@Override
public Set<String> getParameters()
{
return m_info.getValidationRule().getAllParameters();
}
@Override
public IValidationContext getValidationContext()
{
return m_evalCtx;
}
public boolean isNumericKey()
{
return getColumnName().ends... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MLookup.java | 1 |
请完成以下Java代码 | public void execute(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {
// Nothing to do, logic happens on state transition
}
@Override
public void trigger(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {
RepetitionRule repetitionRu... | CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);
EventSubscriptionService eventSubscriptionService = cmmnEngineConfiguration.getEventSubscriptionServiceConfiguration().getEventSubscriptionService();
List<EventSubscripti... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\VariableEventListenerActivityBehaviour.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setOrderedByPartyGLN(String value) {
this.orderedByPartyGLN = value;
}
/**
* Gets the value of the contractNumber property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getContractNumber() {
return contrac... | * <p>
* For example, to add a new item, do as follows:
* <pre>
* getFreeText().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link FreeTextType }
*
*
*/
public List<FreeTextType> getFreeText() {
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ORDERSExtensionType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Wsdl11Definition stockAvailabilityWebServiceV1()
{
return createWsdl(StockAvailabilityWebServiceV1.WSDL_BEAN_NAME);
}
// e.g. http://localhost:8080/ws/Msv3BestellenService.wsdl
@Bean(name = OrderWebServiceV1.WSDL_BEAN_NAME)
public Wsdl11Definition orderWebServiceV1()
{
return createWsdl(OrderWebServic... | @Bean("Msv3FachlicheFunktionen")
public XsdSchema msv3FachlicheFunktionenV1()
{
return createXsdSchema("Msv3FachlicheFunktionen.xsd");
}
private static Wsdl11Definition createWsdl(@NonNull final String beanName)
{
return new SimpleWsdl11Definition(createSchemaResource(beanName + ".wsdl"));
}
private static... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\WebServiceConfigV1.java | 2 |
请完成以下Spring Boot application配置 | management:
security:
enabled: false
server:
port: 8081
spring:
boot:
admin:
url: http://localhost:8080/admin-server
info:
app:
name: "@project.name@"
description: "@project.desc | ription@"
version: "@project.version@"
spring-boot-version: "@project.parent.version@" | repos\SpringAll-master\23.Spring-Boot-Admin\Spring Boot Admin Client\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public Book getBook(@PathVariable Long id) {
return books.get(id);
}
@ApiOperation(value="更新信息", notes="根据url的id来指定更新图书信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "图书ID", required = true, dataType = "Long",paramType = "path"),
@ApiImplicitParam(name = "b... | return "success";
}
@ApiOperation(value="删除图书", notes="根据url的id来指定删除图书")
@ApiImplicitParam(name = "id", value = "图书ID", required = true, dataType = "Long",paramType = "path")
@RequestMapping(value="/{id}", method=RequestMethod.DELETE)
public String deleteUser(@PathVariable Long id) {
books.r... | repos\SpringBootLearning-master\springboot-swagger\src\main\java\com\forezp\controller\BookContrller.java | 2 |
请完成以下Spring Boot application配置 | #spring.datasource.url=jdbc:h2:file:C:/data/demodb
#spring.datasource.url=jdbc:h2:file:~/demodb
spring.datasource.url=jdbc:h2:file:./src/main/resources/db/demodb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.h2.console.enabled=true
spring.jpa.hibernate.... | a.database-platform=org.hibernate.dialect.H2Dialect
spring.h2.console.path=/h2-console
spring.jpa.properties.hibernate.globally_quoted_identifiers=true | repos\tutorials-master\persistence-modules\spring-boot-persistence-h2\src\main\resources\application-persistent-on.properties | 2 |
请完成以下Java代码 | public <R> R map(@NonNull final CaseMappingFunction<T, R> mappingFunction)
{
switch (type)
{
case ANY:
return mappingFunction.anyValue();
case IS_NULL:
return mappingFunction.valueIsNull();
case NOT_NULL:
return mappingFunction.valueIsNotNull();
case EQUALS_TO:
return mappingFunction.va... | public Void valueIsNull()
{
queryBuilder.addEqualsFilter(columnName, null);
return null;
}
@Override
public Void valueIsNotNull()
{
queryBuilder.addNotNull(columnName);
return null;
}
@Override
public Void valueEqualsTo(@NonNull final T value)
{
queryBuilder.addEqualsFil... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\ValueRestriction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class CaffeineCacheConfiguration {
@Bean
CaffeineCacheManager cacheManager(CacheProperties cacheProperties, CacheManagerCustomizers customizers,
ObjectProvider<Caffeine<Object, Object>> caffeine, ObjectProvider<CaffeineSpec> caffeineSpec,
ObjectProvider<CacheLoader<Object, Object>> cacheLoader) {
CaffeineCac... | private void setCacheBuilder(CacheProperties cacheProperties, @Nullable CaffeineSpec caffeineSpec,
@Nullable Caffeine<Object, Object> caffeine, CaffeineCacheManager cacheManager) {
String specification = cacheProperties.getCaffeine().getSpec();
if (StringUtils.hasText(specification)) {
cacheManager.setCacheSp... | repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\autoconfigure\CaffeineCacheConfiguration.java | 2 |
请完成以下Java代码 | public JobQuery includeJobsWithoutTenantId() {
this.includeJobsWithoutTenantId = true;
return this;
}
//sorting //////////////////////////////////////////
public JobQuery orderByJobDuedate() {
return orderBy(JobQueryProperty.DUEDATE);
}
public JobQuery orderByExecutionId() {
return orderBy(... | public List<Job> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext
.getJobManager()
.findJobsByQueryCriteria(this, page);
}
@Override
public List<ImmutablePair<String, String>> executeDeploymentIdMappingsList(CommandContext commandContext) {
che... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobQueryImpl.java | 1 |
请完成以下Java代码 | private Mono<Void> saveChangeSessionId() {
if (!hasChangedSessionId()) {
return Mono.empty();
}
String sessionId = getId();
Publisher<Void> replaceSessionId = (s) -> {
this.originalSessionId = sessionId;
s.onComplete();
};
if (this.isNew) {
return Mono.from(replaceSessionId);
}
... | }
}
private static final class RedisSessionMapperAdapter
implements BiFunction<String, Map<String, Object>, Mono<MapSession>> {
private final RedisSessionMapper mapper = new RedisSessionMapper();
@Override
public Mono<MapSession> apply(String sessionId, Map<String, Object> map) {
return Mono.fromSuppl... | repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\ReactiveRedisSessionRepository.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.