instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void se... | public void setUsing2FA(boolean isUsing2FA) {
this.isUsing2FA = isUsing2FA;
}
@Override
public int hashCode() {
int prime = 31;
int result = 1;
result = (prime * result) + ((email == null) ? 0 : email.hashCode());
return result;
}
@Override
public boolea... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\model\User.java | 1 |
请完成以下Java代码 | public boolean hasInactive()
{
return false;
}
/**
* Get Zoom - default implementation
* @return Zoom AD_Window_ID
*/
public AdWindowId getZoom()
{
return null;
} // getZoom
/**
* Get Zoom - default implementation
* @param query query
* @return Zoom Window - here 0
*/
public AdWindowId ge... | * Is this lookup model populated
* @return boolean
*/
public boolean isLoaded()
{
return m_loaded;
}
/**
* Returns a list of parameters on which this lookup depends.
*
* Those parameters will be fetched from context on validation time.
*
* @return list of parameter names
*/
public Set<String> ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\Lookup.java | 1 |
请完成以下Java代码 | public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getOrgCategory() {
return orgCategory;
}
public void setOrgCategory(String orgCategory) {
this.orgCategory = ... | }
public void setFax(String fax) {
this.fax = fax;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysDepartModel.java | 1 |
请完成以下Spring Boot application配置 | spring.redis.database=0
spring.redis.host=localhost
spring.redis.port=16379
spring.redis.password=mypass
spring.redis.timeout=60000
spring.redis.lettuce.pool.max-active=8
spring.redis.lettuce.pool. | max-idle=8
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.min-idle=0 | repos\tutorials-master\persistence-modules\redis\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private ImpDataCell parseDataCell(final String line, final ImpFormatColumn column)
{
try
{
final String rawValue = extractCellRawValue(line, column);
final Object value = column.parseCellValue(rawValue);
return ImpDataCell.value(value);
}
catch (final Exception ex)
{
return ImpDataCell.error(Erro... | }
else
{
// check length
if (impFormatColumn.getStartNo() > 0 && impFormatColumn.getEndNo() <= line.length())
{
return line.substring(impFormatColumn.getStartNo() - 1, impFormatColumn.getEndNo());
}
else
{
return null;
}
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\FixedPositionImpDataLineParser.java | 1 |
请完成以下Java代码 | public void setAD_User_ID (int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
}
/** Get Ansprechpartner.
@return User within the system - Internal or Business Partner Contact
*/
@Override... | }
/** Set Datensatz-ID.
@param Record_ID
Direct internal record ID
*/
@Override
public void setRecord_ID (int Record_ID)
{
if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
/** Get Datensatz-ID.
@re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Private_Access.java | 1 |
请完成以下Java代码 | public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Method of ordering records; lowest number comes first
*/
@Override
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return... | */
@Override
public java.lang.String getValueMin ()
{
return (java.lang.String)get_Value(COLUMNNAME_ValueMin);
}
/** Set Value Format.
@param VFormat
Format of the value; Can contain fixed format elements, Variables: "_lLoOaAcCa09"
*/
@Override
public void setVFormat (java.lang.String VFormat)
{
s... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process_Para.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WarehouseTypeId implements RepoIdAware
{
int repoId;
@JsonCreator
public static WarehouseTypeId ofRepoId(final int repoId)
{
return new WarehouseTypeId(repoId);
}
@Nullable
public static WarehouseTypeId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new WarehouseTypeId(repoId) : null;... | public static int toRepoId(@Nullable final WarehouseTypeId id)
{
return id != null ? id.getRepoId() : -1;
}
private WarehouseTypeId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "repoId");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\WarehouseTypeId.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Set<String> getAssociatedUrls(String baseUrl) {
URI url = new URI(baseUrl);
return Arrays.stream(InetAddress.getAllByName(url.getHost()))
.map(InetAddress::getHostAddress)
.map(ip -> {
try {
return new URI(url.getScheme(... | }
private void stopHealthChecker(BaseHealthChecker<C, T> healthChecker) throws Exception {
healthChecker.destroyClient();
devices.remove(healthChecker.getTarget().getDeviceId());
log.info("Stopped {} for {}", healthChecker.getClass().getSimpleName(), healthChecker.getTarget().getBaseUrl());... | repos\thingsboard-master\monitoring\src\main\java\org\thingsboard\monitoring\service\BaseMonitoringService.java | 2 |
请完成以下Java代码 | public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getTweet() {
return tweet;
}
public void setTweet(String tweet) {
this.tweet = tweet;
} | public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public Set<String> getLikes() {
return likes;
}
public void setLikes(Set<String> likes) {
this.likes = likes;
}
} | repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\relationships\models\Tweet.java | 1 |
请完成以下Java代码 | public class Client {
private final ClientId id;
private final String firstName;
private final String lastName;
private final Account account;
@JsonCreator
public Client(@JsonProperty("id") ClientId id,
@JsonProperty("firstName") String firstName,
@JsonPrope... | }
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public Account getAccount() {
return account;
}
} | repos\spring-examples-java-17\spring-bank\bank-common\src\main\java\itx\examples\springbank\common\dto\Client.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ScheduledExecutorServiceDemo {
private Task runnableTask;
private CallableTask callableTask;
private void execute() {
ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
getTasksToRun().apply(executorService);
executorService.shutdown();
}
private void exec... | return (executorService -> {
Future<String> resultFuture = executorService.schedule(callableTask, 1, TimeUnit.SECONDS);
executorService.scheduleAtFixedRate( runnableTask, 100, 450, TimeUnit.SECONDS);
executorService.scheduleWithFixedDelay( runnableTask, 100, 150, TimeUnit.SECONDS);
return null;
});
}
p... | repos\tutorials-master\core-java-modules\core-java-concurrency-basic\src\main\java\com\baeldung\concurrent\executorservice\ScheduledExecutorServiceDemo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public TaxCategoryProvider getTaxCategoryProvider(@NonNull final JsonExternalSystemRequest request)
{
return TaxCategoryProvider.builder()
.normalRates(request.getParameters().get(ExternalSystemConstants.PARAM_NORMAL_VAT_RATES))
.reducedRates(request.getParameters().get(ExternalSystemConstants.PARAM_REDUCED_... | final String isTaxIncluded = request.getParameters().get(ExternalSystemConstants.PARAM_IS_TAX_INCLUDED);
if (isTaxIncluded == null)
{
throw new RuntimeCamelException("isTaxIncluded is missing although priceListId is specified, targetPriceListId: " + priceListId);
}
targetPriceListInfoBuilder.isTaxIncluded(B... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\product\GetProductsRouteHelper.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<DPRIC1> getDPRIC1() {
if (dpric1 == null) {
dpric1 = new ArrayList<DPRIC1>();
}
return this.dpric1;
}
/**
* Gets the value of the drefe1 property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. The... | }
/**
* Sets the value of the dtaxi1 property.
*
* @param value
* allowed object is
* {@link DTAXI1 }
*
*/
public void setDTAXI1(DTAXI1 value) {
this.dtaxi1 = value;
}
/**
* Gets the value of the dalch1 property.
*
* <p>
* T... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_invoic\de\metas\edi\esb\jaxb\stepcom\invoic\DETAILXrech.java | 2 |
请完成以下Java代码 | public int getRecord_ID()
{
return Record_ID;
}
public void setRecord_ID(int record_ID)
{
Record_ID = record_ID;
}
@Override
public List<I_C_DunningLevel> getC_DunningLevels()
{
return C_DunningLevels;
}
public void setC_DunningLevels(List<I_C_DunningLevel> c_DunningLevels)
{
C_DunningLevels = c_D... | {
return writeOff;
}
public void setWriteOff(Boolean writeOff)
{
this.writeOff = writeOff;
}
@Override
public String getAdditionalWhere()
{
return additionalWhere;
}
public void setAdditionalWhere(String additionalWhere)
{
this.additionalWhere = additionalWhere;
}
@Override
public ApplyAccessFi... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DunningCandidateQuery.java | 1 |
请完成以下Java代码 | public String getFieldValueFormat ()
{
return (String)get_Value(COLUMNNAME_FieldValueFormat);
}
/** Set Null Value.
@param IsNullFieldValue Null Value */
public void setIsNullFieldValue (boolean IsNullFieldValue)
{
set_Value (COLUMNNAME_IsNullFieldValue, Boolean.valueOf(IsNullFieldValue));
}
/** Get N... | /** Type AD_Reference_ID=540203 */
public static final int TYPE_AD_Reference_ID=540203;
/** Set Field Value = SV */
public static final String TYPE_SetFieldValue = "SV";
/** Set Art.
@param Type
Type of Validation (SQL, Java Script, Java Language)
*/
public void setType (String Type)
{
set_Value (COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_AD_TriggerUI_Action.java | 1 |
请完成以下Java代码 | public void updateNoPriceConditionsColor(@NonNull final I_C_OrderLine orderLine)
{
final HasPricingConditions hasPricingConditions = hasPricingConditions(orderLine);
final ColorId colorId = getColorId(hasPricingConditions);
orderLine.setNoPriceConditionsColor_ID(ColorId.toRepoId(colorId));
}
@Nullable
privat... | }
}
private boolean isMandatoryPricingConditions()
{
final ColorId noPriceConditionsColorId = getNoPriceConditionsColorId();
return noPriceConditionsColorId != null;
}
private boolean isPricingConditionsMissingButRequired(final I_C_OrderLine orderLine)
{
// Pricing conditions are not required for packing ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderLinePricingConditions.java | 1 |
请完成以下Java代码 | public Predicate toPredicate(final Root<T> root, final CriteriaQuery<?> query, final CriteriaBuilder builder) {
final List<Object> args = castArguments(root);
final Object argument = args.get(0);
switch (RsqlSearchOperation.getSimpleOperator(operator)) {
case EQUAL: {
if (ar... | // === private
private List<Object> castArguments(final Root<T> root) {
final Class<? extends Object> type = root.get(property).getJavaType();
final List<Object> args = arguments.stream().map(arg -> {
if (type.equals(Integer.class)) {
return Integer.pars... | repos\tutorials-master\spring-web-modules\spring-rest-query-language\src\main\java\com\baeldung\persistence\dao\rsql\GenericRsqlSpecification.java | 1 |
请完成以下Java代码 | protected void prepare()
{
ProcessInfoParameter[] para = getParametersAsArray();
for (int i = 0; i < para.length; i++)
{
String name = para[i].getParameterName();
if (para[i].getParameter() == null)
;
else if (name.equals("C_Order_ID"))
p_C_Order_ID = ((BigDecimal)para[i].getParameter()).intValu... | {
int To_C_Order_ID = getRecord_ID();
log.info("From C_Order_ID=" + p_C_Order_ID + " to " + To_C_Order_ID);
if (To_C_Order_ID == 0)
throw new IllegalArgumentException("Target C_Order_ID == 0");
if (p_C_Order_ID == 0)
throw new IllegalArgumentException("Source C_Order_ID == 0");
MOrder from = new MOrder ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\CopyFromOrder.java | 1 |
请完成以下Java代码 | public class SmsFlashPromotionProductRelation implements Serializable {
@ApiModelProperty(value = "编号")
private Long id;
private Long flashPromotionId;
@ApiModelProperty(value = "编号")
private Long flashPromotionSessionId;
private Long productId;
@ApiModelProperty(value = "限时购价格")
pri... | public void setFlashPromotionPrice(BigDecimal flashPromotionPrice) {
this.flashPromotionPrice = flashPromotionPrice;
}
public Integer getFlashPromotionCount() {
return flashPromotionCount;
}
public void setFlashPromotionCount(Integer flashPromotionCount) {
this.flashPromotionCo... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsFlashPromotionProductRelation.java | 1 |
请完成以下Java代码 | public byte[] serialize(String topic, Headers headers, Object data) {
if (data == null) {
return null;
}
Serializer<Object> delegate = findDelegate(data);
return delegate.serialize(topic, headers, data);
}
protected <T> Serializer<T> findDelegate(T data) {
return findDelegate(data, this.delegates);
}
... | throw new SerializationException("No matching delegate for type: " + data.getClass().getName()
+ "; supported types: " + delegates.keySet().stream()
.map(Class::getName)
.toList());
}
return (Serializer<T>) delegate;
}
else {
for (Entry<Class<?>, Serializer<?>> entry : delegates.entrySet(... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\DelegatingByTypeSerializer.java | 1 |
请完成以下Java代码 | private int getNext(int parent, int charPoint)
{
int startChar = charPoint + 1;
int baseParent = getBase(parent);
int from = parent;
for (int i = startChar; i < charMap.getCharsetSize(); i++)
{
int to = baseParent + i;
... | key = charMap.toString(ids);
path.append(UNUSED_CHAR_VALUE);
currentBase = baseParent;
return from;
}
else
{
return getNext(from, 0);
}
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\datrie\MutableDoubleArrayTrieInteger.java | 1 |
请完成以下Java代码 | public java.lang.String getSMTPHost()
{
return get_ValueAsString(COLUMNNAME_SMTPHost);
}
@Override
public void setSMTPPort (final int SMTPPort)
{
set_Value (COLUMNNAME_SMTPPort, SMTPPort);
}
@Override
public int getSMTPPort()
{
return get_ValueAsInt(COLUMNNAME_SMTPPort);
}
/**
* Type AD_Referen... | public void setType (final java.lang.String Type)
{
set_Value (COLUMNNAME_Type, Type);
}
@Override
public java.lang.String getType()
{
return get_ValueAsString(COLUMNNAME_Type);
}
@Override
public void setUserName (final @Nullable java.lang.String UserName)
{
set_Value (COLUMNNAME_UserName, UserName);... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_MailBox.java | 1 |
请完成以下Java代码 | public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getName() {
return name;
... | return hidden;
}
public void setHidden(Integer hidden) {
this.hidden = hidden;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMenu.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserId {
private final String id;
@JsonCreator
public UserId(@JsonProperty("id") String id) {
this.id = id;
}
public String getId() {
return id;
}
public static UserId from(String id) {
return new UserId(id);
}
@Override
public boolean eq... | }
@Override
public int hashCode() {
return Objects.hash(id);
}
@Override
public String toString() {
return "UserId{" +
"id='" + id + '\'' +
'}';
}
} | repos\spring-examples-java-17\spring-security\src\main\java\itx\examples\springboot\security\springsecurity\services\dto\UserId.java | 2 |
请完成以下Java代码 | public static Set<DocStatus> completedOrClosedStatuses()
{
return COMPLETED_OR_CLOSED_STATUSES;
}
public boolean isCompletedOrClosedOrReversed()
{
return this == Completed
|| this == Closed
|| this == Reversed;
}
public boolean isCompletedOrClosedReversedOrVoided()
{
return this == Completed
... | {
return this == Drafted
|| this == InProgress
|| this == Invalid;
}
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean isDraftedInProgressOrCompleted()
{
return this == Drafted
|| this == InProgress
|| this == Completed;
}
public boolean isNotProcessed()
{
return isDrafted... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocStatus.java | 1 |
请完成以下Java代码 | public void setGrandTotal (java.math.BigDecimal GrandTotal)
{
set_Value (COLUMNNAME_GrandTotal, GrandTotal);
}
/** Get Summe Gesamt.
@return Summe über Alles zu diesem Beleg
*/
@Override
public java.math.BigDecimal getGrandTotal ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_GrandTotal);
if (b... | if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Offener Betrag.
@param OpenAmt Offener Betrag */
@Override
public void setOpenAmt (java.math.BigDecimal OpenAmt)
{
set_Value (COLUMNNAME_OpenAmt, OpenAmt);
}
/** Get Offener Betr... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java-gen\de\metas\dunning\model\X_C_Dunning_Candidate_Invoice_v1.java | 1 |
请完成以下Java代码 | public static String constructBaseUrl(HttpServletRequest request) {
return String.format("%s://%s:%d",
getScheme(request),
getDomainName(request),
getPort(request));
}
public static String getScheme(HttpServletRequest request){
String scheme = req... | public static int getPort(HttpServletRequest request){
String forwardedProto = request.getHeader("x-forwarded-proto");
int serverPort = request.getServerPort();
if (request.getHeader("x-forwarded-port") != null) {
try {
serverPort = request.getIntHeader("x-forwarded-... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\utils\MiscUtils.java | 1 |
请完成以下Java代码 | public ImmutableList<I_M_ShipmentSchedule> getByReferences(@NonNull final ImmutableList<TableRecordReference> recordRefs)
{
final IQueryBuilder<I_M_ShipmentSchedule> queryBuilder = queryBL
.createQueryBuilder(I_M_ShipmentSchedule.class)
.setJoinOr()
.setOption(IQueryBuilder.OPTION_Explode_OR_Joins_To_SQL... | .createQueryBuilder(I_M_ShipmentSchedule.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_M_ShipmentSchedule.COLUMN_C_Order_ID, orderId)
.create()
.idsAsSet(ShipmentScheduleId::ofRepoId);
}
@Override
public <T extends I_M_ShipmentSchedule> Map<ShipmentScheduleId, T> getByIds(@NonNull final Se... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ShipmentSchedulePA.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getAssignee() {
return assignee;
}
@ApiModelProperty(value = "Required when completing a task with a form", example = "12345")
public String getFormDefinitionId() {
return formDefinitionId;
}
public void setFormDefinitionId(String formDefinitionId) {
this.... | @ApiModelProperty(value = "If action is complete, you can use this parameter to set variables ")
@JsonTypeInfo(use = Id.CLASS, defaultImpl = RestVariable.class)
public List<RestVariable> getVariables() {
return variables;
}
@ApiModelProperty(value = "If action is complete, you can use this para... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskActionRequest.java | 2 |
请完成以下Java代码 | public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context)
{
final OrderId quotationId = OrderId.ofRepoIdOrNull(context.getSingleSelectedRecordId());
if (quotationId == null)
{
return ProcessPreconditionsResolution.rejectWithInternalReason("no document selec... | @RunOutOfTrx
protected String doIt()
{
final OrderId quotationId = OrderId.ofRepoId(getRecord_ID());
checkEligibleSalesQuotation(quotationId)
.throwExceptionIfRejected();
final I_C_Order salesOrder = CreateSalesOrderAndBOMsFromQuotationCommand.builder()
.fromQuotationId(quotationId)
.docTypeId(Doc... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\process\C_Order_CreateFromQuotation_Construction.java | 1 |
请完成以下Java代码 | public class TextAnnotationXMLConverter extends BaseBpmnXMLConverter {
protected Map<String, BaseChildElementParser> childParserMap = new HashMap<String, BaseChildElementParser>();
public TextAnnotationXMLConverter() {
TextAnnotationTextParser annotationTextParser = new TextAnnotationTextParser();
... | @Override
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw)
throws Exception {
TextAnnotation textAnnotation = (TextAnnotation) element;
writeDefaultAttribute(ATTRIBUTE_TEXTFORMAT, textAnnotation.getTextFormat(), xtw);
}
@Override
... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\TextAnnotationXMLConverter.java | 1 |
请完成以下Java代码 | public boolean matches(String ipAddress) {
// Do not match null or blank address
if (!StringUtils.hasText(ipAddress)) {
return false;
}
assertNotHostName(ipAddress);
InetAddress remoteAddress = parseAddress(ipAddress);
if (!this.requiredAddress.getClass().equals(remoteAddress.getClass())) {
return fa... | && ipAddress.indexOf(':') > 0;
// @formatter:on
}
private InetAddress parseAddress(String address) {
try {
return InetAddress.getByName(address);
}
catch (UnknownHostException ex) {
throw new IllegalArgumentException("Failed to parse address '" + address + "'", ex);
}
}
@Override
public String to... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\util\matcher\IpAddressMatcher.java | 1 |
请完成以下Java代码 | public final class GenericPermissions extends AbstractPermissions<Permission>
{
public static final Builder builder()
{
return new Builder();
}
private GenericPermissions(final Builder builder)
{
super(builder);
}
public Builder toBuilder()
{
return new Builder(this);
}
public static class Builder ex... | * Convenient method add a {@link Permission} only if the <code>condition</code> is evaluated as <code>true</code>.
*
* If condition is evaluated as <code>false</code> the permission won't be added.
*
* When adding the permission we use {@link CollisionPolicy#Override}.
*
* @param condition
* @pa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\GenericPermissions.java | 1 |
请完成以下Java代码 | public boolean containsPoint(Point point) {
// Consider left and top side to be inclusive for points on border
return point.getX() >= this.x1
&& point.getX() < this.x2
&& point.getY() >= this.y1
&& point.getY() < this.y2;
}
public boolean doesOverlap(Regio... | @Override
public String toString() {
return "[Region (x1=" + x1 + ", y1=" + y1 + "), (x2=" + x2 + ", y2=" + y2 + ")]";
}
public float getX1() {
return x1;
}
public float getY1() {
return y1;
}
public float getX2() {
return x2;
}
public float getY2(... | repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\quadtree\Region.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ZonedDateTimeFilter getLastTrade() {
return lastTrade;
}
public void setLastTrade(ZonedDateTimeFilter lastTrade) {
this.lastTrade = lastTrade;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || ... | symbol,
price,
lastTrade
);
}
@Override
public String toString() {
return "QuoteCriteria{" +
(id != null ? "id=" + id + ", " : "") +
(symbol != null ? "symbol=" + symbol + ", " : "") +
(price != null ? "price=" + price + ", " :... | repos\tutorials-master\jhipster-modules\jhipster-uaa\quotes\src\main\java\com\baeldung\jhipster\quotes\service\dto\QuoteCriteria.java | 2 |
请完成以下Java代码 | public static Collector<InvoicePayScheduleLine, ?, Optional<InvoicePaySchedule>> collect()
{
return GuavaCollectors.collectUsingListAccumulator(InvoicePaySchedule::optionalOfList);
}
public boolean isValid()
{
return lines.stream().allMatch(InvoicePayScheduleLine::isValid);
}
public boolean validate(@NonNul... | }
private void markAsValid(final boolean isValid)
{
lines.forEach(line -> line.setValid(isValid));
}
private Money getTotalDueAmt()
{
return getLines()
.stream()
.map(InvoicePayScheduleLine::getDueAmount)
.reduce(Money::add)
.orElseThrow(() -> new AdempiereException("No lines"));
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\paymentschedule\InvoicePaySchedule.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(final String name) {
this.name = name;
}
public OPERATION getOperation() {
return OPERATION.parse(operation);
}
public void setOperation(final OPERATION operation) {
this.operation = operation.getValu... | return false;
if (getClass() != obj.getClass())
return false;
final Bar other = (Bar) obj;
if (name == null) {
return other.name == null;
} else
return name.equals(other.name);
}
@Override
public String toString() {
return "Bar [na... | repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\persistence\model\Bar.java | 1 |
请完成以下Java代码 | public static <T> boolean detectAndRemoveCycle(Node<T> head) {
CycleDetectionResult<T> result = CycleDetectionByFastAndSlowIterators.detectCycle(head);
if (result.cycleExists) {
removeCycle(result.node, head);
}
return result.cycleExists;
}
private static <T> void ... | }
private static <T> int calculateCycleLength(Node<T> loopNodeParam) {
Node<T> loopNode = loopNodeParam;
int length = 1;
while (loopNode.next != loopNodeParam) {
length++;
loopNode = loopNode.next;
}
return length;
}
} | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-2\src\main\java\com\baeldung\algorithms\linkedlist\CycleRemovalByCountingLoopNodes.java | 1 |
请完成以下Spring Boot application配置 | logging.level.root=INFO
# OracleDB connection settings
spring.datasource.url=jdbc:oracle:thin:@//localhost:11521/ORCLPDB1
spring.datasource.username=books
spring.datasource.password=books
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
# Comment this line for standard Spring Boot default choosing algorit... | or-validate-connection=select * from dual
spring.datasource.oracleucp.connection-pool-name=UcpPoolBooks
spring.datasource.oracleucp.initial-pool-size=5
spring.datasource.oracleucp.min-pool-size=5
spring.datasource.oracleucp.max-pool-size=10
# JPA settings
spring.jpa.database-platform=org.hibernate.dialect.OracleDialec... | repos\tutorials-master\persistence-modules\spring-boot-persistence\src\main\resources\application-oracle-pooling-basic.properties | 2 |
请完成以下Java代码 | private void enableConstraints(final String trxName)
{
final String sql = "SET CONSTRAINTS ALL IMMEDIATE";
DB.executeUpdateAndThrowExceptionOnFail(sql, trxName);
logger.info("Constraints immediate");
}
private void updateMigrationStatus()
{
Services.get(IMigrationBL.class).updateStatus(migration);
}
@O... | {
if (isError && !logger.isErrorEnabled())
{
return;
}
if (!isError && !logger.isInfoEnabled())
{
return;
}
final StringBuffer sb = new StringBuffer();
sb.append(Services.get(IMigrationBL.class).getSummary(migration));
if (!Check.isEmpty(msg, true))
{
sb.append(": ").append(msg.trim());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationExecutor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HUStockInfoRepository
{
public Stream<HUStockInfo> getByQuery(@NonNull final HUStockInfoQuery query)
{
final IQueryBL queryBL = Services.get(IQueryBL.class);
final IQueryBuilder<I_M_HU_Stock_Detail_V> queryBuilder = queryBL.createQueryBuilder(I_M_HU_Stock_Detail_V.class)
.setJoinOr()
.setOpt... | .map(this::ofRecord);
}
private HUStockInfo ofRecord(@NonNull final I_M_HU_Stock_Detail_V record)
{
final ADReferenceService adReferenceService = ADReferenceService.get();
final IUOMDAO uomsRepo = Services.get(IUOMDAO.class);
final ITranslatableString huStatus = adReferenceService.retrieveListNameTranslatabl... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\stock\HUStockInfoRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected CommandContext getCommandContext() {
return Context.getCommandContext();
}
protected <T> T getSession(Class<T> sessionClass) {
return getCommandContext().getSession(sessionClass);
}
// Engine scoped
protected IdentityLinkServiceConfiguration getIdentityLinkServiceCon... | return getIdentityLinkServiceConfiguration().getClock();
}
protected FlowableEventDispatcher getEventDispatcher() {
return getIdentityLinkServiceConfiguration().getEventDispatcher();
}
protected IdentityLinkEntityManager getIdentityLinkEntityManager() {
return getIdentityLinkServiceCon... | repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\impl\persistence\AbstractManager.java | 2 |
请完成以下Java代码 | private static ImmutableList<AnnotatedPoint> buildOrderedAnnotatedPointList(
@NonNull final List<InstantInterval> intervals,
@NonNull final List<InstantInterval> intervalsToRemove)
{
final List<AnnotatedPoint> annotatedPoints = new ArrayList<>();
intervals.forEach(interval -> {
annotatedPoints.add(Annota... | @NonNull
Instant value;
@NonNull
PointType type;
public static AnnotatedPoint of(@NonNull final Instant instant, @NonNull final PointType type)
{
return AnnotatedPoint.builder()
.value(instant)
.type(type)
.build();
}
@Override
public int compareTo(@NonNull final AnnotatedPoint othe... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\IntervalUtils.java | 1 |
请完成以下Java代码 | public String getDeploymentId() {
return deploymentId;
}
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
public String getParentDeploymentId() {
return parentDeploymentId;
}
public void setParentDeploymentId(String parentDeploymentId... | public boolean isForceDMN11() {
return forceDMN11;
}
public void setForceDMN11(boolean forceDMN11) {
this.forceDMN11 = forceDMN11;
}
public boolean isDisableHistory() {
return disableHistory;
}
public void setDisableHistory(boolean disableHistory) {
this.disableHi... | repos\flowable-engine-main\modules\flowable-dmn-api\src\main\java\org\flowable\dmn\api\ExecuteDecisionContext.java | 1 |
请完成以下Java代码 | protected boolean shouldFetchValue(VariableInstanceEntity entity) {
// do not fetch values for byte arrays eagerly (unless requested by the user)
return isByteArrayFetchingEnabled
|| !AbstractTypedValueSerializer.BINARY_VALUE_TYPES.contains(entity.getSerializer().getType().getName());
}
// getters ... | }
public String[] getCaseExecutionIds() {
return caseExecutionIds;
}
public String[] getCaseInstanceIds() {
return caseInstanceIds;
}
public String[] getTaskIds() {
return taskIds;
}
public String[] getBatchIds() {
return batchIds;
}
public String[] getVariableScopeIds() {
ret... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\VariableInstanceQueryImpl.java | 1 |
请完成以下Java代码 | protected String doIt()
{
ppOrderCandidateService.closeCandidates(getPinstanceId());
return MSG_OK;
}
@Override
@RunOutOfTrx
protected void prepare()
{
if (createSelection() <= 0)
{
throw new AdempiereException("@NoSelection@");
}
}
private int createSelection()
{
final IQueryBuilder<I_PP_Orde... | return queryBuilder
.create()
.createSelection(adPInstanceId);
}
@NonNull
private IQueryBuilder<I_PP_Order_Candidate> createOCQueryBuilder()
{
final IQueryFilter<I_PP_Order_Candidate> userSelectionFilter = getProcessInfo().getQueryFilterOrElse(null);
if (userSelectionFilter == null)
{
throw new A... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\process\PP_Order_Candidate_CloseSelection.java | 1 |
请完成以下Java代码 | public DocumentIdsSelection getDocumentIdsToInvalidate(final TableRecordReferenceSet recordRefs)
{
return DocumentIdsSelection.EMPTY;
}
@Override
public void invalidateAll() {}
@NonNull
Optional<ImmutableList<AttachmentLinksRequest>> createAttachmentLinksRequestList()
{
final ImmutableList<AttachmentLinksR... | @NonNull
private List<OrderAttachmentRow> aggregateRowsByAttachmentEntryId()
{
final ArrayListMultimap<Integer, OrderAttachmentRow> rowsByAttachmentEntryId = rowsById.values()
.stream()
.collect(GuavaCollectors.toArrayListMultimapByKey(OrderAttachmentRow::getAttachmentEntryId));
final ImmutableList.Build... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\attachmenteditor\OrderAttachmentRows.java | 1 |
请完成以下Java代码 | public void setDiscountAmt (java.math.BigDecimal DiscountAmt)
{
set_Value (COLUMNNAME_DiscountAmt, DiscountAmt);
}
/** Get Discount Amount.
@return Calculated amount of discount
*/
@Override
public java.math.BigDecimal getDiscountAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DiscountAmt);
... | if (ii == null)
return 0;
return ii.intValue();
}
/** Set Verarbeitet.
@param Processed
Checkbox sagt aus, ob der Beleg verarbeitet wurde.
*/
@Override
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Verarbeitet.
@return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CashLine.java | 1 |
请完成以下Java代码 | private LookupValuesList getTargetExportStatusLookupValues(final LookupDataSourceContext context)
{
final I_C_Doc_Outbound_Log docOutboundLog = ediDocOutBoundLogService.retreiveById(getSelectedDocOutboundLogIds().iterator().next());
final EDIExportStatus fromExportStatus = EDIExportStatus.ofCode(docOutboundLog.ge... | {
final EDIExportStatus targetExportStatus = EDIExportStatus.ofCode(p_TargetExportStatus);
for (final DocOutboundLogId logId : getSelectedDocOutboundLogIds())
{
ChangeEDI_ExportStatusHelper.C_DocOutbound_LogDoIt(targetExportStatus, logId);
}
return MSG_OK;
}
private ImmutableSet<DocOutboundLogId> getS... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\edi_desadv\ChangeEDI_ExportStatus_C_Doc_Outbound_Log_GridView.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String getKeyColumn(MTable table)
{
String[] keyColumns = table.getKeyColumns();
if (keyColumns == null || keyColumns.length != 1)
{
throw new TableColumnPathException(null, "Table " + table.getTableName() + " should have one and only one key column");
}
String keyColumn = keyColumns[0];
return ... | else
{
logger.info("No Value " + sql);
}
}
catch (SQLException e)
{
throw new DBException(e, sql);
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt = null;
}
return retValue;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\impl\TableColumnPathBL.java | 2 |
请完成以下Java代码 | public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@return Comment or Hint
*/
public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set IP Address.
@param IP_Address
Defines the IP address to transfer data to
*/
public void se... | {
return new KeyNamePair(get_ID(), getName());
}
/** Set Password.
@param Password
Password of any length (case sensitive)
*/
public void setPassword (String Password)
{
set_Value (COLUMNNAME_Password, Password);
}
/** Get Password.
@return Password of any length (case sensitive)
*/
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Media_Server.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static Map<EncodeHintType, ErrorCorrectionLevel> extractHints(final String eclStr, final BarcodeFormat format)
{
// Hints
final Map<EncodeHintType, ErrorCorrectionLevel> hints = new HashMap<>();
// get error correction level
if (format == BarcodeFormat.QR_CODE)
{
if (!Check.isEmpty(eclStr, true))... | return hints;
}
private static byte[] toByteArray(final BitMatrix matrix, final String imageFormat)
{
//
// Create image from BitMatrix
final BufferedImage image = MatrixToImageWriter.toBufferedImage(matrix);
// Convert BufferedImage to imageFormat and write it into the stream
try
{
final ByteArrayO... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\rest\BarcodeRestController.java | 2 |
请完成以下Java代码 | public NewRecordDescriptor getNewRecordDescriptor(final DocumentEntityDescriptor entityDescriptor)
{
final WindowId newRecordWindowId = entityDescriptor.getWindowId();
return newRecordDescriptorsByTableName.values()
.stream()
.filter(descriptor -> WindowId.equals(newRecordWindowId, descriptor.getNewRecord... | if (newRecordDescriptor == null)
{
return null;
}
try
{
return documentDescriptors.getDocumentEntityDescriptor(newRecordDescriptor.getNewRecordWindowId());
}
catch (final Exception ex)
{
logger.warn("Failed fetching document entity descriptor for {}. Ignored", newRecordDescriptor, ex);
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\NewRecordDescriptorsProvider.java | 1 |
请完成以下Java代码 | public BigDecimal getQueuingTime()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QueuingTime);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setS_Resource_ID (final int S_Resource_ID)
{
if (S_Resource_ID < 1)
set_ValueNoCheck (COLUMNNAME_S_Resource_ID, null);
else
s... | @Override
public void setValue (final java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Override
public java.lang.String getValue()
{
return get_ValueAsString(COLUMNNAME_Value);
}
@Override
public void setWaitingTime (final @Nullable BigDecimal WaitingTime)
{
set_Value (COLUMNNAME_Wai... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_Resource.java | 1 |
请完成以下Java代码 | public boolean isAsyncBefore() {
return !isAsyncAfter();
}
protected void updateAsyncBeforeTargetConfiguration() {
AsyncContinuationConfiguration targetConfiguration = new AsyncContinuationConfiguration();
AsyncContinuationConfiguration currentConfiguration = (AsyncContinuationConfiguration) jobEntity... | if (outgoingTransitions.isEmpty()) {
targetConfiguration.setAtomicOperation(PvmAtomicOperation.ACTIVITY_END.getCanonicalName());
}
else {
targetConfiguration.setAtomicOperation(PvmAtomicOperation.TRANSITION_NOTIFY_LISTENER_TAKE.getCanonicalName());
if (outgoingTransitions.size() == 1) {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingAsyncJobInstance.java | 1 |
请完成以下Java代码 | private static void run() throws Exception {
HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory((HttpRequest request) -> {
request.setParser(new JsonObjectParser(JSON_FACTORY));
});
GitHubUrl url = new GitHubUrl("https://api.github.com/users");
url.per_pa... | request = requestFactory.buildGetRequest(url);
ExecutorService executor = Executors.newSingleThreadExecutor();
Future<HttpResponse> responseFuture = request.executeAsync(executor);
User eugen = responseFuture.get().parseAs(User.class);
System.out.println(eugen);
executor.shutdown... | repos\tutorials-master\libraries-http-2\src\main\java\com\baeldung\googlehttpclientguide\GitHubExample.java | 1 |
请完成以下Java代码 | public class AtomicOperationDeleteCascadeFireActivityEnd extends AbstractEventAtomicOperation {
@Override
protected ScopeImpl getScope(InterpretableExecution execution) {
ActivityImpl activity = (ActivityImpl) execution.getActivity();
if (activity != null) {
return activity;
... | protected void eventNotificationsCompleted(InterpretableExecution execution) {
ActivityImpl activity = (ActivityImpl) execution.getActivity();
if ((execution.isScope())
&& (activity != null)) {
execution.setActivity(activity.getParentActivity());
execution.perform... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\runtime\AtomicOperationDeleteCascadeFireActivityEnd.java | 1 |
请完成以下Java代码 | public class JodaDateTimeType implements VariableType {
public String getTypeName() {
return "jodadatetime";
}
public boolean isCachable() {
return true;
}
public boolean isAbleToStore(Object value) {
if (value == null) {
return true;
}
return D... | Long longValue = valueFields.getLongValue();
if (longValue != null) {
return new DateTime(longValue);
}
return null;
}
public void setValue(Object value, ValueFields valueFields) {
if (value != null) {
valueFields.setLongValue(((DateTime) value).getMillis... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\variable\JodaDateTimeType.java | 1 |
请完成以下Java代码 | public class DefaultTableColorProvider extends TableColorProviderAdapter
{
/** Color Column Index of Model */
private int colorColumnIndex = -1;
/** Color Column compare data */
private Object colorDataCompare = Env.ZERO;
@Override
public Color getForegroundColor(ITable table, int rowIndexModel)
{
final int c... | if (!(data instanceof BigDecimal))
data = new BigDecimal(data.toString());
cmp = ((BigDecimal)colorDataCompare).compareTo((BigDecimal)data);
}
}
catch (Exception e)
{
return 0;
}
if (cmp > 0)
{
return -1;
}
if (cmp < 0)
{
return 1;
}
return 0;
}
public int getColorColumnIn... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\ui\DefaultTableColorProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonFileItemWriterDemo {
@Autowired
private JobBuilderFactory jobBuilderFactory;
@Autowired
private StepBuilderFactory stepBuilderFactory;
@Autowired
private ListItemReader<TestData> simpleReader;
@Bean
public Job jsonFileItemWriterJob() throws Exception {
return j... | }
private JsonFileItemWriter<TestData> jsonFileItemWriter() throws IOException {
// 文件输出目标地址
FileSystemResource file = new FileSystemResource("/Users/mrbird/Desktop/file.json");
Path path = Paths.get(file.getPath());
if (!Files.exists(path)) {
Files.createFile(path);
... | repos\SpringAll-master\69.spring-batch-itemwriter\src\main\java\cc\mrbird\batch\job\JsonFileItemWriterDemo.java | 2 |
请完成以下Java代码 | public Set<ErrorPage> getErrorPages() {
return this.errorPages;
}
@Override
public void setErrorPages(Set<? extends ErrorPage> errorPages) {
Assert.notNull(errorPages, "'errorPages' must not be null");
this.errorPages = new LinkedHashSet<>(errorPages);
}
@Override
public void addErrorPages(ErrorPage... er... | public void setShutdown(Shutdown shutdown) {
this.shutdown = shutdown;
}
/**
* Returns the shutdown configuration that will be applied to the server.
* @return the shutdown configuration
* @since 2.3.0
*/
public Shutdown getShutdown() {
return this.shutdown;
}
/**
* Return the {@link SslBundle} tha... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\AbstractConfigurableWebServerFactory.java | 1 |
请完成以下Java代码 | public static class AdaptiveCard {
@JsonProperty("$schema")
private final String schema = "http://adaptivecards.io/schemas/adaptive-card.json";
private final String type = "AdaptiveCard";
private BackgroundImage backgroundImage;
@JsonProperty("body")
private List<TextBloc... | private final String type = "TextBlock";
private String text;
private String weight = "Normal";
private String size = "Medium";
private String spacing = "None";
private String color = "#FFFFFF";
private final boolean wrap = true;
}
@Data
@NoArgsConstructor
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\notification\channels\TeamsAdaptiveCard.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class ZipkinHttpClientSender extends HttpSender {
private final HttpClient httpClient;
private final Duration readTimeout;
ZipkinHttpClientSender(Encoding encoding, Factory endpointSupplierFactory, String endpoint, HttpClient httpClient,
Duration readTimeout) {
super(encoding, endpointSupplierFactory, endpoi... | .timeout(this.readTimeout);
headers.forEach((name, value) -> request.header(name, value));
try {
HttpResponse<Void> response = this.httpClient.send(request.build(), BodyHandlers.discarding());
if (response.statusCode() / 100 != 2) {
throw new IOException("Expected HTTP status 2xx, got %d".formatted(respon... | repos\spring-boot-4.0.1\module\spring-boot-zipkin\src\main\java\org\springframework\boot\zipkin\autoconfigure\ZipkinHttpClientSender.java | 2 |
请完成以下Java代码 | public static boolean isEmpty(Map<?, ?> obj) {
return null == obj || obj.isEmpty();
}
/**
* 函数功能说明 : 获得文件名的后缀名. 修改者名字: 修改日期: 修改内容:
*
* @参数: @param fileName
* @参数: @return
* @return String
* @throws
*/
public static String getExt(String fileName) {
return ... | *
* @param content
* @return
*/
public static int getByteSize(String content) {
int size = 0;
if (null != content) {
try {
// 汉字采用utf-8编码时占3个字节
size = content.getBytes("utf-8").length;
} catch (UnsupportedEncodingException e) {
... | repos\roncoo-pay-master\roncoo-pay-common-core\src\main\java\com\roncoo\pay\common\core\utils\StringUtil.java | 1 |
请完成以下Java代码 | public boolean isStarted() {
return true;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jetty.util.component.LifeCycle#isStarting()
*/
@Override
public boolean isStarting() {
return false;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jetty.util.com... | /*
* (non-Javadoc)
*
* @see org.eclipse.jetty.util.component.LifeCycle#stop()
*/
@Override
public void stop() throws Exception {
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jetty.server.Handler#destroy()
*/
@Override
public void destroy() {
}
/*
... | repos\tutorials-master\libraries-server-2\src\main\java\com\baeldung\jetty\programmatic\LoggingRequestHandler.java | 1 |
请完成以下Java代码 | public final class POCacheLocal extends AbstractPOCacheLocal
{
private final Reference<PO> parentPORef;
public static POCacheLocal newInstance(@NonNull final PO parent, @NonNull final String parentColumnName, @NonNull final String tableName)
{
return new POCacheLocal(parent, parentColumnName, tableName);
}
pri... | @Override
protected String getParentTrxName()
{
return getParentPO().get_TrxName();
}
@Override
protected int getId()
{
final PO parentPO = getParentPO();
final String parentColumnName = getParentColumnName();
return parentPO.get_ValueAsInt(parentColumnName);
}
@Override
protected boolean setId(final... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\POCacheLocal.java | 1 |
请完成以下Java代码 | public class PaymentTypeInformationSDD {
@XmlElement(name = "SvcLvl", required = true)
protected ServiceLevelSEPA svcLvl;
@XmlElement(name = "LclInstrm", required = true)
protected LocalInstrumentSEPA lclInstrm;
@XmlElement(name = "SeqTp", required = true)
@XmlSchemaType(name = "string")
pr... | *
* @param value
* allowed object is
* {@link SequenceType1Code }
*
*/
public void setSeqTp(SequenceType1Code value) {
this.seqTp = value;
}
/**
* Gets the value of the ctgyPurp property.
*
* @return
* possible object is
* {@l... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\PaymentTypeInformationSDD.java | 1 |
请完成以下Java代码 | public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException {
return new JcaExecutorServiceManagedConnection(this);
}
@SuppressWarnings("rawtypes")
public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, Connec... | public ResourceAdapter getResourceAdapter() {
return ra;
}
public void setResourceAdapter(ResourceAdapter ra) {
this.ra = ra;
}
@Override
public int hashCode() {
return 31;
}
@Override
public boolean equals(Object other) {
if (other == null)
return false;
if (other == this)
... | repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\outbound\JcaExecutorServiceManagedConnectionFactory.java | 1 |
请完成以下Java代码 | public String toString() {
return "Consult{" +
"id=" + id +
", products=" + products +
", orderDate=" + orderDate +
", customer=" + customer +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == nu... | public Long getId() {
return id;
}
public LocalDate getOrderDate() {
return orderDate;
}
public void setOrderDate(LocalDate orderDate) {
this.orderDate = orderDate;
}
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer c... | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\java\com\baeldung\spring\data\jpa\joinquery\entities\CustomerOrder.java | 1 |
请完成以下Java代码 | public ImmutableList<ITranslatableString> validate()
{
if (!isActive())
{
return ImmutableList.of();
}
final ImmutableList.Builder<ITranslatableString> result = ImmutableList.builder();
if (!isAddressSpecifiedByExistingLocationIdOnly())
{
if (isBlank(countryCode))
{
result.add(TranslatableSt... | .existingLocationId(getExistingLocationId())
.address1(getAddress1())
.address2(getAddress2())
.address3(getAddress3())
.address4(getAddress4())
.poBox(getPoBox())
.postal(getPostal())
.city(getCity())
.region(getRegion())
.district(getDistrict())
.countryCode(getCountryCode())
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\BPartnerLocation.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PayPalConfig
{
public static final String DEFAULT_orderApproveCallbackUrl = "/paypal_confirm";
String clientId;
String clientSecret;
MailTemplateId orderApproveMailTemplateId;
@Getter(AccessLevel.NONE)
String orderApproveCallbackUrl;
boolean sandbox;
String baseUrl;
String webUrl;
@Builder
p... | public String getOrderApproveCallbackUrl(final String defaultBaseUrl)
{
if (orderApproveCallbackUrl.startsWith("http"))
{
return orderApproveCallbackUrl;
}
else
{
if (defaultBaseUrl == null)
{
throw new AdempiereException("Config error: Order approve URL is just a path and no base url was provid... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\config\PayPalConfig.java | 2 |
请完成以下Java代码 | public void saveAuthorizedClient(OAuth2AuthorizedClient authorizedClient, Authentication principal,
HttpServletRequest request, HttpServletResponse response) {
Assert.notNull(authorizedClient, "authorizedClient cannot be null");
Assert.notNull(request, "request cannot be null");
Assert.notNull(response, "respo... | }
}
}
}
@SuppressWarnings("unchecked")
private Map<String, OAuth2AuthorizedClient> getAuthorizedClients(HttpServletRequest request) {
HttpSession session = request.getSession(false);
Map<String, OAuth2AuthorizedClient> authorizedClients = (session != null)
? (Map<String, OAuth2AuthorizedClient>) sessio... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\HttpSessionOAuth2AuthorizedClientRepository.java | 1 |
请完成以下Java代码 | public class ApiKey extends ApiKeyInfo {
@Serial
private static final long serialVersionUID = -2313196723950490263L;
@NoXss
@Schema(description = "API key value", requiredMode = Schema.RequiredMode.REQUIRED)
private String value;
public ApiKey() {
super();
}
public ApiKey(Api... | super(apiKey);
this.value = apiKey.getValue();
}
public ApiKey(ApiKeyInfo apiKeyInfo) {
super(apiKeyInfo);
this.value = null;
}
public ApiKey(ApiKeyInfo apiKeyInfo, String value) {
super(apiKeyInfo);
this.value = value;
}
} | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\pat\ApiKey.java | 1 |
请完成以下Java代码 | public int size() {
return inputVariableContainer.getVariableNames().size();
}
@Override
public Collection<Object> values() {
Set<String> variableNames = inputVariableContainer.getVariableNames();
List<Object> values = new ArrayList<>(variableNames.size());
for (String key :... | @Override
public boolean isEmpty() {
throw new UnsupportedOperationException();
}
public void addUnstoredKey(String unstoredKey) {
UNSTORED_KEYS.add(unstoredKey);
}
protected Map<String, Object> getVariables() {
if (this.scopeContainer instanceof VariableScope) {
... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\scripting\ScriptBindings.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void prepareExternalStatusCreateRequest(@NonNull final Exchange exchange, @NonNull final JsonExternalStatus externalStatus)
{
final GRSRestAPIContext context = ProcessorHelper.getPropertyOrThrowError(exchange, GRSSignumConstants.ROUTE_PROPERTY_GRS_REST_API_CONTEXT, GRSRestAPIContext.class);
final JsonExte... | @Override
public String getServiceValue()
{
return "defaultRestAPIGRS";
}
@Override
public String getExternalSystemTypeCode()
{
return GRSSIGNUM_SYSTEM_NAME;
}
@Override
public String getEnableCommand()
{
return ENABLE_RESOURCE_ROUTE;
}
@Override
public String getDisableCommand()
{
return DISAB... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\restapi\GRSRestAPIRouteBuilder.java | 2 |
请完成以下Java代码 | private final BigDecimal getOrderLineQtyEnteredTU(final I_C_Invoice_Candidate ic, final Set<Integer> seenIOLs)
{
BigDecimal qtyEnteredTU = BigDecimal.ZERO;
final List<I_M_InOutLine> iols = Services.get(IInvoiceCandDAO.class).retrieveInOutLinesForCandidate(ic, I_M_InOutLine.class);
if (iols.isEmpty()) // if no I... | if (iol.isPackagingMaterial())
{
iolQtyEnteredTU = iol.getQtyEntered(); // the bound line is the PM line
}
else
{
iolQtyEnteredTU = iol.getQtyEnteredTU();
}
if (iolQtyEnteredTU != null) // safety
{
qtyEnteredTU = qtyEnteredTU.add(iolQtyEnteredTU);
}
}
return qtyEnteredTU;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\C_Invoice_Candidate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public BigDecimal getNetWeight() {
return netWeight;
}
/**
* Sets the value of the netWeight property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setNetWeight(BigDecimal value) {
this.netWeight = value;
}
... | *
*/
public String getNotOtherwiseSpecified() {
return notOtherwiseSpecified;
}
/**
* Sets the value of the notOtherwiseSpecified property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNotOtherwiseSpecified... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\Hazardous.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setIsAllowOverdelivery (final boolean IsAllowOverdelivery)
{
set_Value (COLUMNNAME_IsAllowOverdelivery, IsAllowOverdelivery);
}
@Override
public boolean isAllo... | }
@Override
public int getM_Picking_Config_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Picking_Config_ID);
}
/**
* WEBUI_PickingTerminal_ViewProfile AD_Reference_ID=540772
* Reference name: WEBUI_PickingTerminal_ViewProfile
*/
public static final int WEBUI_PICKINGTERMINAL_VIEWPROFILE_AD_Reference_ID=5407... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\picking\model\X_M_Picking_Config.java | 1 |
请完成以下Java代码 | protected Set<String> getTableNamesToSkipOnMigrationScriptsLogging()
{
return ImmutableSet.of(
I_C_Queue_WorkPackage.Table_Name,
I_C_Queue_WorkPackage_Log.Table_Name,
I_C_Queue_WorkPackage_Param.Table_Name
);
}
private void startQueueProcessors()
{
// task 04585: start queue processors only if we... | */
@Override
public void onUserLogin(final int AD_Org_ID, final int AD_Role_ID, final int AD_User_ID)
{
if (!Ini.isSwingClient())
{
return;
}
final int delayMillis = getInitDelayMillis();
Services.get(IQueueProcessorExecutorService.class).init(delayMillis);
}
/**
* Destroy all queueud processors o... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\model\validator\Main.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private JsonMetasfreshId getSourceLocationMFIdByIdentifier(
@NonNull final String locationIdentifier,
@NonNull final JsonResponseBPartnerCompositeUpsertItem bpartnerUpsertResponseItem)
{
if (bpartnerUpsertResponseItem.getResponseLocationItems() == null || bpartnerUpsertResponseItem.getResponseLocationItems().i... | return bpartnerUpsertResponseItem.getResponseLocationItems()
.stream()
.map(JsonResponseUpsertItem::getMetasfreshId)
.filter(Objects::nonNull)
.findFirst()
.orElseThrow(() -> new RuntimeCamelException("No location JsonResponseUpsertItem found!"));
}
@NonNull
private JsonMetasfreshId getBPartnerM... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\patient\processor\CreateBPRelationReqProcessor.java | 2 |
请完成以下Java代码 | public void store(MultipartFile file) {
try {
if (file.isEmpty()) {
throw new StorageException("Failed to store empty file " + file.getOriginalFilename());
}
Files.copy(file.getInputStream(), this.rootLocation.resolve(file.getOriginalFilename()));
} ca... | }
else {
throw new StorageFileNotFoundException("Could not read file: " + filename);
}
} catch (MalformedURLException e) {
throw new StorageFileNotFoundException("Could not read file: " + filename, e);
}
}
@Override
public void deleteAll(... | repos\SpringBootLearning-master\springboot-upload-file\src\main\java\com\forezp\storage\FileSystemStorageService.java | 1 |
请完成以下Java代码 | public static OrgMappingId ofRepoId(final int repoId)
{
return new OrgMappingId(repoId);
}
@Nullable
public static OrgMappingId ofRepoIdOrNull(@Nullable final Integer repoId)
{
return repoId != null && repoId > 0 ? new OrgMappingId(repoId) : null;
}
@Nullable
public static OrgMappingId ofRepoIdOrNull(fina... | public static int toRepoIdOr(@Nullable final OrgMappingId orgMappingId, final int defaultValue)
{
return orgMappingId != null ? orgMappingId.getRepoId() : defaultValue;
}
private OrgMappingId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "AD_Org_Mapping_ID");
}
@JsonValue
public in... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\OrgMappingId.java | 1 |
请完成以下Java代码 | public static final class ReadLines {
}
@Override
public void preStart() {
log.info("Starting ReadingActor {}", this);
}
@Override
public void postStop() {
log.info("Stopping ReadingActor {}", this);
}
@Override
public Receive createReceive() {
return recei... | CompletableFuture<Object> future =
ask(wordCounterActorRef, new WordCounterActor.CountWords(line), 1000).toCompletableFuture();
futures.add(future);
}
Integer totalNumberOfWords = futures.stream()
... | repos\tutorials-master\akka-modules\akka-actors\src\main\java\com\baeldung\akkaactors\ReadingActor.java | 1 |
请完成以下Java代码 | public Entry<String, Object> next() {
Entry<String, Object> entry = delegate.next();
return new AbstractMap.SimpleEntry<>(entry.getKey(), cachingResolver.resolveProperty(entry.getKey()));
}
}
@Override
public void forEach(BiConsumer<? super String, ? super Object> action) {
... | }
@Override
public boolean hasNext() {
return entryIterator.hasNext();
}
@Override
public Object next() {
Entry<String, Object> entry = entryIterator.next();
return cachingResolver.resolveProperty(entry.getKey());
}
}
} | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\caching\EncryptableMapWrapper.java | 1 |
请完成以下Java代码 | private Step childJobOneStep() {
return new JobStepBuilder(new StepBuilder("childJobOneStep"))
.job(childJobOne())
.launcher(jobLauncher)
.repository(jobRepository)
.transactionManager(platformTransactionManager)
.build();
}
... | }).build()
).build();
}
private Job childJobTwo() {
return jobBuilderFactory.get("childJobTwo")
.start(
stepBuilderFactory.get("childJobTwoStep")
.tasklet((stepContribution, chunkContext) -> {
... | repos\springboot-demo-master\SpringBatch\src\main\java\com\et\batch\job\NestedJobDemo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SetTimerJobRetriesCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
protected final String jobId;
protected final int retries;
protected JobServiceConfiguration jobServiceConfiguration;
public SetTimerJobRetriesCmd(String jobId, int retries... | if (job != null) {
job.setRetries(retries);
FlowableEventDispatcher eventDispatcher = jobServiceConfiguration.getEventDispatcher();
if (eventDispatcher != null && eventDispatcher.isEnabled()) {
eventDispatcher.dispatchEvent(FlowableJobEventBuilder.createEntityEvent(... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\SetTimerJobRetriesCmd.java | 2 |
请完成以下Java代码 | public HistoricProcessInstanceReport createHistoricProcessInstanceReport() {
return new HistoricProcessInstanceReportImpl(commandExecutor);
}
public HistoricTaskInstanceReport createHistoricTaskInstanceReport() {
return new HistoricTaskInstanceReportImpl(commandExecutor);
}
public CleanableHistoricPro... | return new HistoricDecisionInstanceStatisticsQueryImpl(decisionRequirementsDefinitionId, commandExecutor);
}
@Override
public HistoricExternalTaskLogQuery createHistoricExternalTaskLogQuery() {
return new HistoricExternalTaskLogQueryImpl(commandExecutor);
}
@Override
public String getHistoricExternalT... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoryServiceImpl.java | 1 |
请完成以下Java代码 | static class RabbitDockerComposeConnectionDetails extends DockerComposeConnectionDetails
implements RabbitConnectionDetails {
private final RabbitEnvironment environment;
private final List<Address> addresses;
protected RabbitDockerComposeConnectionDetails(RunningService service) {
super(service);
thi... | }
@Override
public String getVirtualHost() {
return "/";
}
@Override
public List<Address> getAddresses() {
return this.addresses;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-amqp\src\main\java\org\springframework\boot\amqp\docker\compose\RabbitDockerComposeConnectionDetailsFactory.java | 1 |
请完成以下Java代码 | public int getProductId()
{
return shipmentSchedule.getM_Product_ID();
}
public TableRecordReference getReferenced()
{
return TableRecordReference.ofReferenced(shipmentSchedule);
}
public BigDecimal getQtyToDeliverOverride()
{
return shipmentSchedule.getQtyToDeliver_Override();
}
public int getBillBPa... | public DeliveryRule getDeliveryRule()
{
final IShipmentScheduleEffectiveBL shipmentScheduleBL = Services.get(IShipmentScheduleEffectiveBL.class);
return shipmentScheduleBL.getDeliveryRule(shipmentSchedule);
}
public void setDiscarded()
{
this.discarded = true;
}
public void removeFromGroup()
{
group.re... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\inout\util\DeliveryLineCandidate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void configure(HttpSecurity http) throws Exception {
http
// 配置请求地址的权限
.authorizeRequests()
.antMatchers("/test/demo").permitAll() // 所有用户可访问
.antMatchers("/test/admin").hasRole("ADMIN") // 需要 ADMIN 角色
.antMatc... | // .logoutUrl("/logout") // 退出 URL 地址
.permitAll(); // 所有用户可访问
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.
// 使用内存中的 InMemoryUserDetailsManager
inMemoryAuthentication()
... | repos\SpringBoot-Labs-master\lab-01-spring-security\lab-01-springsecurity-demo-role\src\main\java\cn\iocoder\springboot\lab01\springsecurity\config\SecurityConfig.java | 2 |
请完成以下Java代码 | public abstract class AbstractManager {
protected IdmEngineConfiguration idmEngineConfiguration;
public AbstractManager(IdmEngineConfiguration idmEngineConfiguration) {
this.idmEngineConfiguration = idmEngineConfiguration;
}
// Command scoped
protected CommandContext getCommandContext() ... | protected FlowableEventDispatcher getEventDispatcher() {
return getIdmEngineConfiguration().getEventDispatcher();
}
protected GroupEntityManager getGroupEntityManager() {
return getIdmEngineConfiguration().getGroupEntityManager();
}
protected MembershipEntityManager getMembershipEntity... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\AbstractManager.java | 1 |
请完成以下Java代码 | public class ServiceException extends RuntimeException {
@Getter
private int errcode;
@Getter
private String errmsg;
public ServiceException(ResultCode resultCode) {
this(resultCode.getCode(), resultCode.getMsg());
}
public ServiceException(String message) {
super(message... | super(errmsg);
this.errcode = errcode;
this.errmsg = errmsg;
}
public ServiceException(String message, Throwable cause) {
super(message, cause);
}
public ServiceException(Throwable cause) {
super(cause);
}
public ServiceException(String message, Throwable cause... | repos\spring-boot-demo-master\demo-ldap\src\main\java\com\xkcoding\ldap\exception\ServiceException.java | 1 |
请完成以下Java代码 | public void cleanContainerTree(String ID) {
runURLRequest("ContainerTree", ID);
}
/**
* Clean Container Element for this ID
* @param ID for container element to clean
*/
public void cleanContainerElement(Integer ID) {
cleanContainerElement("" + ID);
}
/**
* Clean Container Element for this ID
* @p... | try {
int c;
while ( (c=stream.read()) != -1 )
srvOutput.append( (char)c );
} catch (Exception E2) {
E2.printStackTrace();
}
} catch (IOException E) {
if (log!=null)
log.warn("Can't clean cache at:" + thisURL + " be carefull, your deployment... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\cm\CacheHandler.java | 1 |
请完成以下Java代码 | public Object getValue(ELContext context) {
return converter.convert(object, type);
}
/**
* Answer <code>null</code>.
*/
@Override
public String getExpressionString() {
return null;
}
/**
* Answer <code>false</code>.
*/
@Override
public boolean isLit... | }
/**
* Throw an exception.
*/
@Override
public void setValue(ELContext context, Object value) {
throw new ELException(LocalMessages.get("error.value.set.rvalue", "<object value expression>"));
}
@Override
public String toString() {
return "ValueExpression(" + object ... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\ObjectValueExpression.java | 1 |
请完成以下Java代码 | public void setM_CostElement(final org.compiere.model.I_M_CostElement M_CostElement)
{
set_ValueFromPO(COLUMNNAME_M_CostElement_ID, org.compiere.model.I_M_CostElement.class, M_CostElement);
}
@Override
public void setM_CostElement_ID (final int M_CostElement_ID)
{
if (M_CostElement_ID < 1)
set_ValueNoChec... | return get_ValueAsPO(COLUMNNAME_P_CostClearing_Acct, org.compiere.model.I_C_ValidCombination.class);
}
@Override
public void setP_CostClearing_A(final org.compiere.model.I_C_ValidCombination P_CostClearing_A)
{
set_ValueFromPO(COLUMNNAME_P_CostClearing_Acct, org.compiere.model.I_C_ValidCombination.class, P_CostC... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostElement_Acct.java | 1 |
请完成以下Java代码 | public Response handleParamsInvalidException(SystemException e) {
log.error("系统错误:{}", e.getMessage());
return new Response().message(e.getMessage());
}
/**
* 统一处理请求参数校验(实体对象传参)
*
* @param e BindException
* @return FebsResponse
*/
@ExceptionHandler(BindException.cla... | * @return FebsResponse
*/
@ExceptionHandler(value = ConstraintViolationException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public Response handleConstraintViolationException(ConstraintViolationException e) {
StringBuilder message = new StringBuilder();
Set<ConstraintViolation<?>> v... | repos\SpringAll-master\62.Spring-Boot-Shiro-JWT\src\main\java\com\example\demo\handler\GlobalExceptionHandler.java | 1 |
请完成以下Java代码 | public void setPercent (final int Percent)
{
set_Value (COLUMNNAME_Percent, Percent);
}
@Override
public int getPercent()
{
return get_ValueAsInt(COLUMNNAME_Percent);
}
/**
* ReferenceDateType AD_Reference_ID=541989
* Reference name: ReferenceDateType
*/
public static final int REFERENCEDATETYPE_A... | }
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
/**
* Status AD_Reference_ID=541993
* Reference name: C_OrderPaySchedule_Status
*/
public static final int STATUS_AD_Reference... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrderPaySchedule.java | 1 |
请完成以下Java代码 | public class AttributesKeyPatternsUtil
{
public static Set<AttributesKeyPattern> parseCommaSeparatedString(final String string)
{
return Splitter.on(",")
.trimResults()
.omitEmptyStrings()
.splitToList(string)
.stream()
.map(attributesKeyStr -> parseSinglePartPattern(attributesKeyStr))
.coll... | }
public static List<AttributesKeyMatcher> extractAttributesKeyMatchers(@NonNull final List<AttributesKeyPattern> patterns)
{
if (patterns.isEmpty())
{
return ImmutableList.of(matchingAll());
}
else if (!patterns.contains(AttributesKeyPattern.OTHER))
{
return patterns.stream()
.map(AttributesKey... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\keys\AttributesKeyPatternsUtil.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public org.compiere.model.I_AD_Process getAD_Process_CustomQuery()
{
return get_ValueAsPO(COLUMNNAME_AD_Process_CustomQuery_ID, org.compiere.model.I_AD_Process.class);
}
@O... | return get_ValueAsBoolean(COLUMNNAME_IsAdditionalCustomQuery);
}
@Override
public void setLeichMehl_PluFile_ConfigGroup_ID (final int LeichMehl_PluFile_ConfigGroup_ID)
{
if (LeichMehl_PluFile_ConfigGroup_ID < 1)
set_ValueNoCheck (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, null);
else
set_ValueNoCheck... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_LeichMehl_PluFile_ConfigGroup.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.