instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void detach() {
this.prev.setNext(this.getNext());
this.next.setPrev(this.getPrev());
}
@Override
public DoublyLinkedList<T> getListReference() {
return this.list;
}
@Override
public LinkedListNode<T> setPrev(LinkedListNode<T> prev) {
this.prev = prev;
... | @Override
public LinkedListNode<T> getPrev() {
return this.prev;
}
@Override
public LinkedListNode<T> getNext() {
return this.next;
}
@Override
public LinkedListNode<T> search(T value) {
return this.getElement() == value ? this : this.getNext().search(value);
}
... | repos\tutorials-master\data-structures\src\main\java\com\baeldung\lrucache\Node.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public RestVariable getVariableFromRequestWithoutAccessCheck(Execution execution, String variableName, RestVariableScope variableScope, boolean includeBinary) {
boolean variableFound = false;
Object value = null;
if (variableScope == null) {
// First, check local variables (which h... | }
protected Execution getExecutionFromRequestWithoutAccessCheck(String executionId) {
Execution execution = runtimeService.createExecutionQuery().executionId(executionId).singleResult();
if (execution == null) {
throw new FlowableObjectNotFoundException("Could not find an execution with... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\BaseExecutionVariableResource.java | 2 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Operation.class, BPMN_ELEMENT_OPERATION)
.namespaceUri(BPMN20_NS)
.extendsType(BaseElement.class)
.instanceProvider(new ModelTypeInstanceProvider<Operation>() {
public... | public String getImplementationRef() {
return implementationRefAttribute.getValue(this);
}
public void setImplementationRef(String implementationRef) {
implementationRefAttribute.setValue(this, implementationRef);
}
public Message getInMessage() {
return inMessageRefChild.getReferenceTargetElement... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\OperationImpl.java | 1 |
请完成以下Java代码 | public static JSONObject toJSONObject(String string) throws JSONException {
JSONObject o = new JSONObject();
JSONTokener x = new JSONTokener(string);
while (x.more()) {
String name = Cookie.unescape(x.nextTo('='));
x.next('=');
o.put(name, Cookie.unescape(x.ne... | Iterator keys = o.keys();
String s;
StringBuilder sb = new StringBuilder();
while (keys.hasNext()) {
s = keys.next().toString();
if (!o.isNull(s)) {
if (b) {
sb.append(';');
}
sb.append(Cookie.escape(s));... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\json\CookieList.java | 1 |
请完成以下Java代码 | public Iterator<Object> iterator() {
return new DecoratingEntryValueIterator(delegate.entrySet().iterator());
}
@Override
public int size() {
return delegate.size();
}
};
}
@Override
@NonNull
public Set<Entry<Strin... | @Override
public void forEach(BiConsumer<? super String, ? super Object> action) {
delegate.forEach((k, v) -> action.accept(k, cachingResolver.resolveProperty(k)));
}
private class DecoratingEntryValueIterator implements Iterator<Object> {
private final Iterator<Entry<String, Object>> entry... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\caching\EncryptableMapWrapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDb() {
return this.db;
}
public void setDb(String db) {
this.db = db;
}
public InfluxConsistency getConsistency() {
return this.consistency;
}
public void setConsistency(InfluxConsistency consistency) {
this.consistency = consistency;
}
public @Nullable String getUserName() {
retu... | return this.uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public boolean isCompressed() {
return this.compressed;
}
public void setCompressed(boolean compressed) {
this.compressed = compressed;
}
public boolean isAutoCreateDb() {
return this.autoCreateDb;
}
public void setAutoCreateDb... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\influx\InfluxProperties.java | 2 |
请完成以下Java代码 | public static MHRPayroll get(Properties ctx, int HR_Payroll_ID)
{
if (HR_Payroll_ID <= 0)
return null;
//
MHRPayroll payroll = s_cache.get(HR_Payroll_ID);
if (payroll != null)
return payroll;
//
payroll = new MHRPayroll(ctx, HR_Payroll_ID, null);
if (payroll.get_ID() == HR_Payroll_ID)
{
s_cach... | * @param rs result set
*/
public MHRPayroll (Properties ctx, ResultSet rs, String trxName)
{
super(ctx, rs, trxName);
}
/**
* Parent Constructor
* @param parent parent
*/
public MHRPayroll (MCalendar calendar)
{
this (calendar.getCtx(), 0, calendar.get_TrxName());
setClientOrg(calendar);
//setC_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\model\MHRPayroll.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CategoryController {
@Resource
private CategoryService categoryService;
@GetMapping("/categories")
public String categoryPage(HttpServletRequest request) {
request.setAttribute("path", "categories");
return "admin/category";
}
/**
* 分类列表
*/
@RequestM... | /**
* 分类修改
*/
@RequestMapping(value = "/categories/update", method = RequestMethod.POST)
@ResponseBody
public Result update(@RequestParam("categoryId") Long categoryId,
@RequestParam("categoryName") String categoryName) {
if (!StringUtils.hasText(categoryName)) {
... | repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\admin\CategoryController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DemoController {
/**
* 监控模型 Transaction 的示例
*/
@GetMapping("/transaction")
public String transaction() {
// 创建 Transaction 对象
Transaction t = Cat.newTransaction("URL", "/demo/transaction");
try {
// ... yourBusiness(); 业务逻辑
// 设置 Trans... | public String event03() {
try {
int result = 1 / 0;
} catch (Throwable e) {
Cat.logErrorWithCategory("custom-category", e);
// Cat.logErrorWithCategory("custom-category", "custom-message", e);
}
return "success";
}
/**
* 监控模型 Metric 示例 01... | repos\SpringBoot-Labs-master\lab-61\lab-61-demo\src\main\java\cn\iocoder\springboot\lab61\catdemo\controller\DemoController.java | 2 |
请完成以下Java代码 | public class InvoiceDunningValidator implements ModelValidator
{
private int adClientId = -1;
@Override
public void initialize(ModelValidationEngine engine, MClient client)
{
if (client != null)
{
adClientId = client.getAD_Client_ID();
}
Check.assume(Services.isAutodetectServices(), "We work with acti... | @Override
public int getAD_Client_ID()
{
return adClientId;
}
@Override
public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID)
{
return null;
}
@Override
public String modelChange(PO po, int type)
{
return null;
}
@Override
public String docValidate(PO po, int timing)
{
return null;... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\invoice\model\validator\InvoiceDunningValidator.java | 1 |
请完成以下Java代码 | private IHUBuilder newHUBuilder()
{
final IHUBuilder huBuilder = Services.get(IHandlingUnitsDAO.class).createHUBuilder(huContext);
huBuilder.setLocatorId(locatorId);
if (!Check.isEmpty(huStatus, true))
{
huBuilder.setHUStatus(huStatus);
}
if (bpartnerId != null)
{
huBuilder.setBPartnerId(bpartnerId... | final HUProducerDestination destination = HUProducerDestination.ofVirtualPI();
HULoader.builder()
.source(HUListAllocationSourceDestination.of(fromCU))
.destination(destination)
.load(AllocationUtils.builder()
.setHUContext(huContext)
.setProduct(cuProductId)
.setQuantity(qtyToSplit)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\TULoaderInstance.java | 1 |
请完成以下Java代码 | public I_PA_Goal getPA_Goal() throws RuntimeException
{
return (I_PA_Goal)MTable.get(getCtx(), I_PA_Goal.Table_Name)
.getPO(getPA_Goal_ID(), get_TrxName()); }
/** Set Goal.
@param PA_Goal_ID
Performance Goal
*/
public void setPA_Goal_ID (int PA_Goal_ID)
{
if (PA_Goal_ID < 1)
set_Value (COLUMN... | }
/** Set Goal Restriction.
@param PA_GoalRestriction_ID
Performance Goal Restriction
*/
public void setPA_GoalRestriction_ID (int PA_GoalRestriction_ID)
{
if (PA_GoalRestriction_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_GoalRestriction_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PA_GoalRestricti... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_GoalRestriction.java | 1 |
请完成以下Java代码 | public boolean isEnabled()
{
if (enabled != null)
{
return enabled;
}
if (template != null)
{
return template.isEnabled();
}
throw new IllegalStateException("Cannot get IsEnabled");
}
@Override
public ITableCacheConfigBuilder setTrxLevel(final TrxLevel trxLevel)
{
this.trxLevel = trxLevel;
... | else if (template != null)
{
return template.getInitialCapacity();
}
throw new IllegalStateException("Cannot get InitialCapacity");
}
@Override
public ITableCacheConfigBuilder setInitialCapacity(final int initialCapacity)
{
this.initialCapacity = initialCapacity;
return this;
}
public int getMaxCa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\impl\TableCacheConfigBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | final LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> createRequestMap() {
Assert.state(this.unmappedMatchers == null, () -> "An incomplete mapping was found for " + this.unmappedMatchers
+ ". Try completing it with something like requestUrls().<something>.hasRole('USER')");
LinkedHashMap<RequestMatc... | private final Collection<ConfigAttribute> configAttrs;
UrlMapping(RequestMatcher requestMatcher, Collection<ConfigAttribute> configAttrs) {
this.requestMatcher = requestMatcher;
this.configAttrs = configAttrs;
}
RequestMatcher getRequestMatcher() {
return this.requestMatcher;
}
Collection<ConfigAt... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AbstractConfigAttributeRequestMatcherRegistry.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setTaxableAmount(BigDecimal value) {
this.taxableAmount = value;
}
/**
* Gets the value of the taxRate property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
public BigDecimal getTaxRate() {
return taxRate;
}
... | public void setTaxAmount(BigDecimal value) {
this.taxAmount = value;
}
/**
* Gets the value of the invoiceAmount property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
public BigDecimal getInvoiceAmount() {
return invoiceAmount... | 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\InvoiceFooterType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UserDetailsImpl implements UserDetails {
private static final long serialVersionUID = 1L;
private Long id;
private String username;
@JsonIgnore
private String password;
public UserDetailsImpl(Long id, String username, String password) {
this.id = id;
this.usernam... | @Override
public boolean isAccountNonExpired() {
return true;
}
@Override
public boolean isAccountNonLocked() {
return true;
}
@Override
public boolean isCredentialsNonExpired() {
return true;
}
@Override
public boolean isEnabled() {
return true... | repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\jwtsignkey\userservice\UserDetailsImpl.java | 2 |
请完成以下Java代码 | public static Object defaultInstantiateDelegate(Class<?> clazz, List<FieldDeclaration> fieldDeclarations, ServiceTask serviceTask) {
return defaultInstantiateDelegate(clazz.getName(), fieldDeclarations, serviceTask);
}
public static Object defaultInstantiateDelegate(Class<?> clazz, List<FieldDeclar... | for (FieldDeclaration declaration : fieldDeclarations) {
applyFieldDeclaration(declaration, target, throwExceptionOnMissingField);
}
}
}
public static void applyFieldDeclaration(FieldDeclaration declaration, Object target) {
applyFieldDeclaration(declaration, target,... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\helper\AbstractClassDelegate.java | 1 |
请完成以下Java代码 | public int getC_Tax_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Tax_ID);
}
@Override
public void setIsDocumentLevel (final boolean IsDocumentLevel)
{
set_Value (COLUMNNAME_IsDocumentLevel, IsDocumentLevel);
}
@Override
public boolean isDocumentLevel()
{
return get_ValueAsBoolean(COLUMNNAME_IsDocumentLe... | {
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
@Override
public void setTaxAmt (final BigDecimal TaxAmt)
{
set_ValueNoCheck (COLUMNNAME_TaxAmt, TaxAmt);
}
@Override
public BigDecimal getTaxAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxAmt);
return bd != null ? bd : BigDecima... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceTax.java | 1 |
请完成以下Java代码 | public class TaskCandidateUserImpl extends TaskCandidateImpl implements TaskCandidateUser {
private String userId;
public TaskCandidateUserImpl() {}
public TaskCandidateUserImpl(String userId, String taskId) {
super(taskId);
this.userId = userId;
}
@Override
public String get... | if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TaskCandidateUserImpl that = (TaskCandidateUserImpl) o;
return Objects.equals(userId, that.userId) && Objects.equals(getTaskId(), that.getTaskId());
}
@... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-task-model-impl\src\main\java\org\activiti\api\task\model\impl\TaskCandidateUserImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Slice<T> findAll(Pageable pageable) {
Objects.requireNonNull(pageable, NULL_PAGEABLE);
return findAll(pageable, entityClass);
}
private Slice<T> findAll(Pageable pageable, Class<T> entityClass) {
final String sql = "SELECT e FROM " + entityClass.getSimpleName() ... | query.setFirstResult((int) pageable.getOffset());
query.setMaxResults(pageable.getPageSize() + 1);
final List<T> content = query.getResultList();
boolean hasNext = content.size() == (pageable.getPageSize() + 1);
if (hasNext) {
content.remove(content.size() - 1);
}
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootSliceAllSimpleSql\src\main\java\com\bookstore\repository\impl\SlicePagingRepositoryImplementation.java | 2 |
请完成以下Java代码 | public class Node {
private String name;
private LinkedList<Node> shortestPath = new LinkedList<>();
private Integer distance = Integer.MAX_VALUE;
private Map<Node, Integer> adjacentNodes = new HashMap<>();
public Node(String name) {
this.name = name;
}
public void addDestinati... | public Integer getDistance() {
return distance;
}
public void setDistance(Integer distance) {
this.distance = distance;
}
public List<Node> getShortestPath() {
return shortestPath;
}
public void setShortestPath(LinkedList<Node> shortestPath) {
this.shortestPath... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-1\src\main\java\com\baeldung\algorithms\dijkstra\Node.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void logRequestRouted(@NonNull final Exchange exchange)
{
final String targetRoute = exchange.getIn().getHeader(HEADER_TARGET_ROUTE, String.class);
processLogger.logMessage("Routing request to: " + targetRoute,
exchange.getIn().getHeader(HEADER_PINSTANCE_ID, Integer.class));
}
private void log... | if (request.getAdPInstanceId() != null)
{
exchange.getIn().setHeader(HEADER_PINSTANCE_ID, request.getAdPInstanceId().getValue());
}
if (EmptyUtil.isNotBlank(request.getWriteAuditEndpoint()))
{
exchange.getIn().setHeader(HEADER_AUDIT_TRAIL, request.getWriteAuditEndpoint());
}
if (request.getParameter... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\from_mf\CallDispatcherRouteBuilder.java | 2 |
请完成以下Java代码 | public boolean isInheritVariables() {
return inheritVariables;
}
public void setInheritVariables(boolean inheritVariables) {
this.inheritVariables = inheritVariables;
}
public List<IOParameter> getInParameters() {
return inParameters;
}
public void setInParameters(List... | return clone;
}
public void setValues(CallActivity otherElement) {
super.setValues(otherElement);
setCalledElement(otherElement.getCalledElement());
setBusinessKey(otherElement.getBusinessKey());
setInheritBusinessKey(otherElement.isInheritBusinessKey());
inParameters =... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\CallActivity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Inventory implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Long id;
private String title;
private int quantity;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
} | public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootRetryVersionlessOptimisticLocking\src\main\java\com\bookstore\entity\Inventory.java | 2 |
请完成以下Java代码 | public String getDisplayName()
{
if (displayName == null)
{
final String productName = Services.get(IProductBL.class).getProductName(getProductId());
displayName = new StringBuilder()
.append(ioLine.getLine()).append(": ")
.append(productName)
.append(" x ")
.append(getQty())
.append... | public MInOutLineHUDocumentLine getReversal()
{
if (reversalSourceLine == null)
{
final org.compiere.model.I_M_InOutLine reversalLine = ioLine.getReversalLine();
final I_M_Transaction mtrx = getTrxReferencedModel();
final I_M_Transaction reversalMTrx = Services.get(IMTransactionDAO.class).retrieveReversal... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\impl\MInOutLineHUDocumentLine.java | 1 |
请完成以下Java代码 | public void setEnvironment(String environment) {
this.environment = environment;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public Component getComponent() {
return component;
}
... | public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
publ... | repos\tutorials-master\spring-boot-modules\spring-boot-properties\src\main\java\com\baeldung\yaml\YAMLConfig.java | 1 |
请完成以下Java代码 | public void leave(ActivityExecution execution) {
callActivityEndListeners(execution);
int nrOfInstances = getLoopVariable(execution, NUMBER_OF_INSTANCES);
if (nrOfInstances == 0) {
// Empty collection, just leave.
super.leave(execution);
return;
}
... | if (childExecution.isActive()) {
executionsToRemove.add((ExecutionEntity) childExecution);
}
}
for (ExecutionEntity executionToRemove : executionsToRemove) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debu... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\ParallelMultiInstanceBehavior.java | 1 |
请完成以下Java代码 | public class ResourceEntityImpl extends AbstractBpmnEngineNoRevisionEntity implements ResourceEntity, Serializable {
private static final long serialVersionUID = 1L;
protected String name;
protected byte[] bytes;
protected String deploymentId;
protected boolean generated;
public ResourceEntit... | return ResourceEntityImpl.class;
}
@Override
public void setGenerated(boolean generated) {
this.generated = generated;
}
/**
* Indicated whether or not the resource has been generated while deploying rather than being actual part of the deployment.
*/
@Override
public boo... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ResourceEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ArticlePreviewDto readForReview(Long id) {
return articleRepository.findOneWithUserAndAttachedFilesByIdAndStatus(id, ArticleStatus.FLAGGED_FOR_MANUAL_REVIEW)
.map(ArticleMapper.INSTANCE::mapForReview)
.orElseThrow();
}
public Page<ArticlePreviewDto> getAllToReview(Pageabl... | @Cacheable(cacheNames = {"article-findCreatedByUserIdById"})
public UUID findCreatedByUserIdById(Long articleId) {
return articleRepository.findCreatedByUserIdById(articleId);
}
public Optional<Article> handleReview(ArticleReviewResultDto dto) {
return articleRepository.findWithModifiedUser... | repos\spring-boot-web-application-sample-master\main-app\main-webapp\src\main\java\gt\app\modules\article\ArticleService.java | 2 |
请完成以下Java代码 | public meta setHttpEquiv (String http_equiv, String content)
{
addAttribute ("content", content);
addAttribute ("http-equiv", http_equiv);
return this;
}
/**
* Sets the lang="" and xml:lang="" attributes
*
* @param lang
* the lang="" and xml:lang="" attributes
*/
public Element setLang ... | */
public meta addElement (Element element)
{
addElementToRegistry (element);
return (this);
}
/**
* Adds an Element to the element.
*
* @param element
* Adds an Element to the element.
*/
public meta addElement (String element)
{
addElementToRegistry (element);
return (this);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\meta.java | 1 |
请完成以下Java代码 | protected boolean afterDelete(final boolean success)
{
if (!success)
{
return success;
}
// Order Delivered/Invoiced
// (Reserved in VMatch and MInOut.completeIt)
final I_C_OrderLine orderLine = getC_OrderLine();
if (orderLine != null)
{
if (getM_InOutLine_ID() > 0)
{
orderLine.setQtyDeli... | }
@Override
public String toString()
{
return new StringBuilder("MMatchPO[")
.append(getM_MatchPO_ID())
.append(",Qty=").append(getQty())
.append(",C_OrderLine_ID=").append(getC_OrderLine_ID())
.append(",M_InOutLine_ID=").append(getM_InOutLine_ID())
.append(",C_InvoiceLine_ID=").append(getC_In... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MMatchPO.java | 1 |
请完成以下Java代码 | public void processDI(CmmnModel cmmnModel, List<CaseDefinitionEntity> caseDefinitions) {
if (caseDefinitions.isEmpty()) {
return;
}
if (!cmmnModel.getLocationMap().isEmpty()) {
List<String> planModelIds = new ArrayList<>();
for (Case caseObject : cmmnModel.... | return cmmnParseHandlers;
}
public void setCmmnParseHandlers(CmmnParseHandlers cmmnParseHandlers) {
this.cmmnParseHandlers = cmmnParseHandlers;
}
public CmmnActivityBehaviorFactory getActivityBehaviorFactory() {
return activityBehaviorFactory;
}
public void setActivityBehavior... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\parser\CmmnParserImpl.java | 1 |
请完成以下Java代码 | default String getTokenType() {
return getClaimAsString(OAuth2TokenIntrospectionClaimNames.TOKEN_TYPE);
}
/**
* Returns a timestamp {@code (exp)} indicating when the token expires
* @return a timestamp indicating when the token expires
*/
@Nullable
default Instant getExpiresAt() {
return getClaimAsInstan... | * @return usually a machine-readable identifier of the resource owner who authorized
* the token
*/
@Nullable
default String getSubject() {
return getClaimAsString(OAuth2TokenIntrospectionClaimNames.SUB);
}
/**
* Returns the intended audience {@code (aud)} for the token
* @return the intended audience fo... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\OAuth2TokenIntrospectionClaimAccessor.java | 1 |
请完成以下Java代码 | public static TableName ofString(@NonNull final String string)
{
return interner.intern(new TableName(string));
}
@Nullable
public static TableName ofNullableString(@Nullable final String string)
{
final String stringNorm = StringUtils.trimBlankToNull(string);
return stringNorm != null
? ofString(string... | return getAsString();
}
public String getAsString()
{
return tableName;
}
public boolean equalsIgnoreCase(@Nullable final String otherTableName)
{
return tableName.equalsIgnoreCase(otherTableName);
}
public static boolean equals(@Nullable TableName tableName1, @Nullable TableName tableName2)
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\api\TableName.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyTU()
{
return inoutLine.getQtyEnteredTU();
}
@Override
public void setQtyTU(final BigDecimal qtyPacks)
{
inoutLine.setQtyEnteredTU(qtyPacks);
}
@Override
public int getC_BPartner_ID()
{
return values.getC_BPartner_ID();
} | @Override
public void setC_BPartner_ID(final int partnerId)
{
values.setC_BPartner_ID(partnerId);
}
@Override
public boolean isInDispute()
{
return inoutLine.isInDispute();
}
@Override
public void setInDispute(final boolean inDispute)
{
inoutLine.setIsInDispute(inDispute);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\InOutLineHUPackingAware.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WordpressProperties {
private List<Menu> menus = new ArrayList<>();
private Theme themes;
private List<Server> servers = new ArrayList<>();
public List<Menu> getMenus() {
return menus;
}
public void setMenus(List<Menu> menus) {
this.menus = menus;
}
publi... | this.themes = themes;
}
public List<Server> getServers() {
return servers;
}
public void setServers(List<Server> servers) {
this.servers = servers;
}
@Override
public String toString() {
return "WordpressProperties{" +
"menus=" + menus +
... | repos\spring-boot-master\yaml-simple\src\main\java\com\mkyong\config\WordpressProperties.java | 2 |
请完成以下Java代码 | public void doFinally()
{
// nothing
}
});
}
}
private ReportResult printPicklist(@NonNull final PackageableRow row)
{
final PInstanceRequest pinstanceRequest = createPInstanceRequest(row);
final PInstanceId pinstanceId = adPInstanceDAO.createADPinstanceAndADPInstancePara(pinstanceRequest);
... | final PInstanceRequest pinstanceRequest = PInstanceRequest.builder()
.processId(PickListPdf_AD_Process_ID)
.processParams(piParams)
.build();
return pinstanceRequest;
}
private String buildFilename(@NonNull final PackageableRow row)
{
final String customer = row.getCustomer().getDisplayName();
fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\packageable\process\PackageablesView_PrintPicklist.java | 1 |
请完成以下Java代码 | protected void autoDeployResources(ProcessEngine processEngine) {
final AutoDeploymentStrategy strategy = getAutoDeploymentStrategy(deploymentMode);
strategy.deployResources(deploymentName, deploymentResources, processEngine.getRepositoryService());
}
@Override
public ProcessEngineConfigura... | }
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
public String getDeploymentMode() {
return deploymentMode;
}
public void setDeploymentMode(String deploymentMode) {
... | repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\SpringProcessEngineConfiguration.java | 1 |
请完成以下Java代码 | public static String toString(final Object obj, final boolean multiLine)
{
if (obj == null)
{
return "<NULL>";
}
try
{
final ToStringStyle toStringStyle;
if (multiLine)
{
toStringStyle = RecursiveIndentedMultilineToStringStyle.instance;
}
else
{
toStringStyle = RecursiveToStringS... | }
/**
* Tests whether two objects are equals.
*
* <p>
* It takes care of the null case. Thus, it is helpful to implement Object.equals.
*
* <p>
* Notice: it uses compareTo if BigDecimal is found. So, in this case, a.equals(b) might not be the same as Objects.equals(a, b).
*
* <p>
* If both a and b... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\ObjectUtils.java | 1 |
请完成以下Java代码 | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public List<SysRole> getRoles() {
return roles;
}
public void setRoles(List<SysRole> roles) {
this.roles = roles;
}
public String ge... | public boolean isCredentialsNonExpired() {
return true;
}
@JsonIgnore
@Override
public boolean isEnabled() {
return true;
}
@JsonIgnore
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return authorities;
}
public void setGran... | repos\springBoot-master\springboot-springSecurity2\src\main\java\com\us\example\domain\SysUser.java | 1 |
请完成以下Java代码 | public class MDistribution extends X_GL_Distribution
{
/**
*
*/
private static final long serialVersionUID = 1020880569780353403L;
public MDistribution (Properties ctx, int GL_Distribution_ID, String trxName)
{
super (ctx, GL_Distribution_ID, trxName);
if (GL_Distribution_ID == 0)
{
// setC_AcctSchema... | setAnyProduct (true); // Y
setAnyProject (true); // Y
setAnySalesRegion (true); // Y
setAnyUser1 (true); // Y
setAnyUser2 (true); // Y
//
setIsValid (false); // N
setPercentTotal (BigDecimal.ZERO);
}
} // MDistribution
public MDistribution (Properties ctx, ResultSet rs, String trxName)
{
su... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MDistribution.java | 1 |
请完成以下Java代码 | public IAsyncBatchBuilder setAD_PInstance_Creator_ID(final PInstanceId adPInstanceId)
{
this.adPInstanceId = adPInstanceId;
return this;
}
private final PInstanceId getAD_PInstance_Creator_ID()
{
return adPInstanceId;
}
private AsyncBatchId getParentAsyncBatchId()
{
return Optional.ofNullable(_parentAs... | return orgId;
}
@Override
public IAsyncBatchBuilder setC_Async_Batch_Type(final String internalName)
{
_asyncBatchType = asyncBatchDAO.retrieveAsyncBatchType(getCtx(), internalName);
return this;
}
public I_C_Async_Batch_Type getC_Async_Batch_Type()
{
Check.assumeNotNull(_asyncBatchType, "_asyncBatchType... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\AsyncBatchBuilder.java | 1 |
请完成以下Java代码 | public int getI_DataEntry_Record_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_I_DataEntry_Record_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Import-Fehlermeldung.
@param I_ErrorMsg
Meldungen, die durch den Importprozess generiert wurden
*/
@Override
public void setI_Err... | }
return false;
}
/** 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 ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_I_DataEntry_Record.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
if (context.getEnvironment().containsProperty(HAZELCAST_CONFIG_PROPERTY)) {
ConditionOutcome configValidationOutcome = HazelcastClientValidation.clientConfigOutcome(context,
HAZELCAST_CONFIG_PROPERTY, startCond... | return new ConditionOutcome(clientConfig, existingConfigurationOutcome(resource, clientConfig));
}
catch (Throwable ex) {
return null;
}
}
private static String existingConfigurationOutcome(Resource resource, boolean client) throws IOException {
URL location = resource.getURL();
return client ? ... | repos\spring-boot-4.0.1\module\spring-boot-hazelcast\src\main\java\org\springframework\boot\hazelcast\autoconfigure\HazelcastClientConfigAvailableCondition.java | 2 |
请完成以下Java代码 | public void infoWebappSuccessfulLogin(String username) {
logInfo("001", "Successful login for user {}.", username);
}
public void infoWebappFailedLogin(String username, String reason) {
logInfo("002", "Failed login attempt for user {}. Reason: {}", username, reason);
}
public void infoWebappLogout(Str... | public void traceCacheValidationTimeUpdated(Date cacheValidationTime, Date newCacheValidationTime) {
logTrace("005", "Cache validation time updated from: {} to: {}", cacheValidationTime, newCacheValidationTime);
}
public void traceAuthenticationUpdated(String engineName) {
logTrace("006", "Authentication u... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\WebappLogger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getIsAllowSett() {
return isAllowSett;
}
public void setIsAllowSett(String isAllowSett) {
this.isAllowSett = isAllowSett == null ? null : isAllowSett.trim();
}
public String getIsCompleteSett() {
return isCompleteSett;
}
public void setIsCompleteSett(Stri... | this.riskDay = riskDay;
}
public String getUserNo() {
return userNo;
}
public void setUserNo(String userNo) {
this.userNo = userNo == null ? null : userNo.trim();
}
public String getAmountDesc() {
if(this.getFundDirection().equals(AccountFundDirectionEnum.ADD.name()))... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpAccountHistory.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class AttributeData implements Comparable<AttributeData>{
private final long lastUpdateTs;
private final String key;
private final Object value;
public AttributeData(long lastUpdateTs, String key, Object value) {
super();
this.lastUpdateTs = lastUpdateTs;
this.key = key;... | public String getKey() {
return key;
}
@Schema(description = "Object representing value of attribute key", example = "false", accessMode = Schema.AccessMode.READ_ONLY)
public Object getValue() {
return value;
}
@Override
public int compareTo(AttributeData o) {
return Lo... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\telemetry\AttributeData.java | 2 |
请完成以下Java代码 | public List<VariableType> getCustomPostVariableTypes() {
return customPostVariableTypes;
}
public AppEngineConfiguration setCustomPostVariableTypes(List<VariableType> customPostVariableTypes) {
this.customPostVariableTypes = customPostVariableTypes;
return this;
}
public Identi... | @Override
public AppEngineConfiguration setVariableJsonMapper(VariableJsonMapper variableJsonMapper) {
this.variableJsonMapper = variableJsonMapper;
return this;
}
public boolean isDisableIdmEngine() {
return disableIdmEngine;
}
public AppEngineConfiguration setDisableIdmEn... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\AppEngineConfiguration.java | 1 |
请完成以下Java代码 | public class MigrationPlanValidationReportImpl implements MigrationPlanValidationReport {
protected MigrationPlan migrationPlan;
protected List<MigrationInstructionValidationReport> instructionReports = new ArrayList<>();
protected Map<String, MigrationVariableValidationReport> variableReports = new HashMap<>();... | @Override
public Map<String, MigrationVariableValidationReport> getVariableReports() {
return variableReports;
}
public void writeTo(StringBuilder sb) {
sb.append("Migration plan for process definition '")
.append(migrationPlan.getSourceProcessDefinitionId())
.append("' to '")
.append(m... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instruction\MigrationPlanValidationReportImpl.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Produkt.
@return Produkt, Leistung, Artikel
*/
@Override
public int getM_Product_ID ()
{
Integer... | @Override
public int getM_Warehouse_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set ResetBufferInterval.
@param ResetBufferInterval ResetBufferInterval */
@Override
public void setResetBufferInterval (java.math.BigDecima... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inout\model\X_M_Material_Balance_Config.java | 1 |
请完成以下Java代码 | public String getPropagatedStageInstanceId() {
return propagatedStageInstanceId;
}
@Override
public void setPropagatedStageInstanceId(String propagatedStageInstanceId) {
this.propagatedStageInstanceId = propagatedStageInstanceId;
}
@Override
public Map<String, Object> getProces... | sb.append("HistoricProcessInstanceEntity[id=").append(getId())
.append(", definition=").append(getProcessDefinitionId());
if (superProcessInstanceId != null) {
sb.append(", superProcessInstanceId=").append(superProcessInstanceId);
}
if (referenceId != null) {
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\HistoricProcessInstanceEntityImpl.java | 1 |
请完成以下Java代码 | public void close() {
isActive = false;
}
public String getToken() {
return token;
}
@Override
public int nextMsgId() {
return msgIdSeq.incrementAndGet();
}
@Override
public void onGetAttributesResponse(GetAttributeResponseMsg getAttributesResponse) {
}
... | }
}
@Override
public void onToDeviceRpcRequest(UUID sessionId, ToDeviceRpcRequestMsg toDeviceRequest) {
log.trace("[{}] Received RPC command to device", sessionId);
try {
snmpTransportContext.getSnmpTransportService().onToDeviceRpcRequest(this, toDeviceRequest);
snmp... | repos\thingsboard-master\common\transport\snmp\src\main\java\org\thingsboard\server\transport\snmp\session\DeviceSessionContext.java | 1 |
请完成以下Java代码 | public static DecisionsEvaluationBuilder evaluateDecisionByKey(CommandExecutor commandExecutor, String decisionDefinitionKey) {
DecisionEvaluationBuilderImpl builder = new DecisionEvaluationBuilderImpl(commandExecutor);
builder.decisionDefinitionKey = decisionDefinitionKey;
return builder;
}
public sta... | return version;
}
public Map<String, Object> getVariables() {
return variables;
}
public String getDecisionDefinitionTenantId() {
return decisionDefinitionTenantId;
}
public boolean isTenantIdSet() {
return isTenantIdSet;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\DecisionEvaluationBuilderImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DataEntrySection
{
DataEntrySectionId id;
ITranslatableString caption;
ITranslatableString description;
String internalName;
boolean initiallyClosed;
boolean availableInApi;
ImmutableList<DataEntryLine> lines;
@Builder
private DataEntrySection( | @NonNull final DataEntrySectionId id,
@NonNull final ITranslatableString caption,
@NonNull final ITranslatableString description,
@NonNull final String internalName,
final boolean initiallyClosed,
final boolean availableInApi,
@Singular final List<DataEntryLine> lines)
{
this.id = id;
this.captio... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\layout\DataEntrySection.java | 2 |
请完成以下Java代码 | public static boolean regex(String regex, String str) {
Pattern p = Pattern.compile(regex, Pattern.MULTILINE);
Matcher m = p.matcher(str);
return m.find();
}
private static Map<String, String> langMap = new HashMap<String, String>();
private final static String ZH = "zh";
private final static String ZH_CN ... | {
browserLangCode = EN_US;
}
return browserLangCode;
}
/** 判断请求是否来自电脑端 */
public static boolean isDesktop(HttpServletRequest request) {
return !isMobile(request);
}
/** 判断请求是否来自移动端 */
public static boolean isMobile(HttpServletRequest request) {
String ua = request.getHeader... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\BrowserUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isWithException() {
return withException;
}
public String getExceptionMessage() {
return exceptionMessage;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
public boolean isWitho... | public String getSubScopeId() {
return subScopeId;
}
public String getScopeType() {
return scopeType;
}
public boolean isWithoutScopeType() {
return withoutScopeType;
}
public String getScopeDefinitionId() {
return scopeDefinitionId;
}
public String ge... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\ExternalWorkerJobQueryImpl.java | 2 |
请完成以下Java代码 | protected boolean isStrategyEnd(CommandContext commandContext) {
return HISTORY_REMOVAL_TIME_STRATEGY_END.equals(getHistoryRemovalTimeStrategy(commandContext));
}
protected String getHistoryRemovalTimeStrategy(CommandContext commandContext) {
return commandContext.getProcessEngineConfiguration()
.get... | protected HistoricDecisionInstanceEntity findDecisionInstanceById(String instanceId, CommandContext commandContext) {
return commandContext.getHistoricDecisionInstanceManager()
.findHistoricDecisionInstance(instanceId);
}
public JobDeclaration<BatchJobContext, MessageEntity> getJobDeclaration() {
ret... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\removaltime\DecisionSetRemovalTimeJobHandler.java | 1 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | @param U_Value Value */
public void setU_Value (String U_Value)
{
set_Value (COLUMNNAME_U_Value, U_Value);
}
/** Get Value.
@return Value */
public String getU_Value ()
{
return (String)get_Value(COLUMNNAME_U_Value);
}
/** Set Web Properties.
@param U_Web_Properties_ID Web Properties */
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_U_Web_Properties.java | 1 |
请完成以下Java代码 | private Quantity computeQtyAvailableToPick()
{
if (pickingBOM == null)
{
return null;
}
Quantity minQtyOfFinishedGoods = null;
for (final QtyCalculationsBOMLine bomLine : pickingBOM.getLines())
{
final BigDecimal componentQtyOnHand = computeComponentQtyOnHand(bomLine.getProductId());
final Quant... | if (stockDetails.isEmpty())
{
// shall not happen
throw new AdempiereException("No component stock details defined for " + componentId);
}
BigDecimal qtyToRemoveRemaining = qtyToRemove.toBigDecimal();
for (final ShipmentScheduleAvailableStockDetail componentStockDetail : stockDetails)
{
if (qtyToRem... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\inout\util\ShipmentScheduleAvailableStockDetail.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getName() {
return this.name;
}
public Authority name(String name) {
this.setName(name);
return this;
}
public void setName(String name) {
this.name = name;
}
@Override
public String getId() {
return this.name;
}
@Transient
... | }
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Authority)) {
return false;
}
return getName() != null... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\domain\Authority.java | 2 |
请完成以下Java代码 | public class Phone {
private String type;
private String areaCode;
private String number;
public Phone() {
}
public Phone(String type, String areaCode, String number) {
this.type = type;
this.areaCode = areaCode;
this.number = number;
}
public String getType() ... | public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Phone)) {
return false;
... | repos\tutorials-master\persistence-modules\spring-data-jpa-enterprise-2\src\main\java\com\baeldung\elementcollection\model\Phone.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setSpecialConditions(String value) {
this.specialConditions = value;
}
/**
* Gets the value of the progressNumberDifference property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getProgressNumberDifferenc... | kanbanID = new ArrayList<String>();
}
return this.kanbanID;
}
/**
* The classification of the product/service in free-text form.Gets the value of the classification property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefo... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\AdditionalLineItemInformationType.java | 2 |
请完成以下Java代码 | public void setQty(final BigDecimal qty)
{
ddOrderLine.setQtyEntered(qty);
final ProductId productId = ProductId.ofRepoIdOrNull(getM_Product_ID());
final I_C_UOM uom = Services.get(IUOMDAO.class).getById(getC_UOM_ID());
final BigDecimal qtyOrdered = Services.get(IUOMConversionBL.class).convertToProductUOM(pro... | @Override
public void setC_UOM_ID(final int uomId)
{
values.setC_UOM_ID(uomId);
// NOTE: uom is mandatory
// we assume orderLine's UOM is correct
if (uomId > 0)
{
ddOrderLine.setC_UOM_ID(uomId);
}
}
@Override
public BigDecimal getQtyTU()
{
return ddOrderLine.getQtyEnteredTU();
}
@Override
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\lowlevel\model\DDOrderLineHUPackingAware.java | 1 |
请完成以下Java代码 | public static int setBitOn(int value, int bitNumber) {
if (bitNumber <= 0 || bitNumber > 8) {
throw new IllegalArgumentException("Only bits 1 through 8 are supported");
}
// To turn on, OR with the correct mask
return value | MASKS[bitNumber - 1];
}
/**
* Set b... | * of bit to check (right first bit starting at 1)
*/
public static boolean isBitOn(int value, int bitNumber) {
if (bitNumber <= 0 || bitNumber > 8) {
throw new IllegalArgumentException("Only bits 1 through 8 are supported");
}
return ((value & MASKS[bitNumber - 1])... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\BitMaskUtil.java | 1 |
请完成以下Java代码 | public int getC_Invoice_From_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Invoice_From_ID);
}
@Override
public void setC_Invoice_Relation_ID (final int C_Invoice_Relation_ID)
{
if (C_Invoice_Relation_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Invoice_Relation_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C... | @Override
public void setC_Invoice_To(final org.compiere.model.I_C_Invoice C_Invoice_To)
{
set_ValueFromPO(COLUMNNAME_C_Invoice_To_ID, org.compiere.model.I_C_Invoice.class, C_Invoice_To);
}
@Override
public void setC_Invoice_To_ID (final int C_Invoice_To_ID)
{
if (C_Invoice_To_ID < 1)
set_Value (COLUMNNA... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Relation.java | 1 |
请完成以下Java代码 | public class BookId implements Serializable {
private static final long serialVersionUID = 1L;
private String title;
private String language;
public BookId() {
}
public BookId(String title, String language) {
this.title = title;
this.language = language;
}
public Str... | if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
BookId other = (BookId) obj;
if (language == null) {
if (other.language != null)
return false;
} else if (!language.equals(other.language))
retur... | repos\tutorials-master\persistence-modules\java-jpa\src\main\java\com\baeldung\jpa\primarykeys\BookId.java | 1 |
请完成以下Java代码 | public boolean isRequired() {
return required;
}
public void setRequired(boolean required) {
this.required = required;
}
public boolean isAvailable() {
return caseActivityInstanceState == AVAILABLE.getStateCode();
}
public boolean isEnabled() {
return caseActivityInstanceState == ENABLED.... | public boolean isTerminated() {
return caseActivityInstanceState == TERMINATED.getStateCode();
}
public String toString() {
return this.getClass().getSimpleName()
+ "[caseActivityId=" + caseActivityId
+ ", caseActivityName=" + caseActivityName
+ ", caseActivityInstanceId=" ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricCaseActivityInstanceEventEntity.java | 1 |
请完成以下Java代码 | public String getLine() {
return line;
}
public void setLine(String line) {
this.line = line;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() { | return state;
}
public void setState(String state) {
this.state = state;
}
public Integer getZip() {
return zip;
}
public void setZip(Integer zip) {
this.zip = zip;
}
} | repos\tutorials-master\libraries-data-io\src\main\java\com\baeldung\libraries\snakeyaml\Address.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isEnableTaskRelationshipCounts() {
return enableTaskRelationshipCounts;
}
public TaskServiceConfiguration setEnableTaskRelationshipCounts(boolean enableTaskRelationshipCounts) {
this.enableTaskRelationshipCounts = enableTaskRelationshipCounts;
return this;
}
publ... | this.enableHistoricTaskLogging = enableHistoricTaskLogging;
return this;
}
@Override
public TaskServiceConfiguration setEnableEventDispatcher(boolean enableEventDispatcher) {
this.enableEventDispatcher = enableEventDispatcher;
return this;
}
@Override
public TaskService... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\TaskServiceConfiguration.java | 2 |
请完成以下Java代码 | public OutboundKafkaChannelBuilder recordKey(String key) {
kafkaChannel.setRecordKey(KafkaOutboundChannelModel.RecordKey.fromFixedValue(key));
return this;
}
@Override
public OutboundEventProcessingPipelineBuilder eventProcessingPipeline() {
return new Outbou... | @Override
public OutboundChannelModelBuilder delegateExpressionSerializer(String delegateExpression) {
this.outboundChannel.setSerializerType("expression");
this.outboundChannel.setSerializerDelegateExpression(delegateExpression);
return outboundChannelDefinitionBuilder;
... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\model\OutboundChannelDefinitionBuilderImpl.java | 1 |
请完成以下Java代码 | public boolean contains(Charset cs) {
return false;
}
@Override
public CharsetDecoder newDecoder() {
return new CharsetDecoder(this, 1.0f, 1.0f) {
@Override
protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) {
... | if (currentChar > 127) {
return CoderResult.unmappableForLength(1);
}
out.put((byte) currentChar);
}
return CoderResult.UNDERFLOW;
}
};
return cd;
}
};
... | repos\tutorials-master\core-java-modules\core-java-string-operations-7\src\main\java\com\baeldung\mutablestrings\MutableStringUsingCharset.java | 1 |
请完成以下Java代码 | public boolean isTaxNotFound()
{
return C_TAX_ID_NO_TAX_FOUND == taxId.getRepoId();
}
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
public boolean isZeroTax() {return this.rate.signum() == 0;}
/**
* Calculate base amount, excluding tax
*/
public BigDecimal calculateBaseAmt(@NonNull final BigDecimal a... | final BigDecimal taxAmt;
final BigDecimal reverseChargeAmt;
if (isWholeTax)
{
Check.assume(taxIncluded, "TaxIncluded shall be set when IsWholeTax is set");
taxAmt = amount;
reverseChargeAmt = BigDecimal.ZERO;
}
else if (isReverseCharge)
{
Check.assume(!taxIncluded, "TaxIncluded shall NOT be set ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\Tax.java | 1 |
请完成以下Java代码 | public void setAD_Task_ID (int AD_Task_ID)
{
if (AD_Task_ID < 1)
set_Value (COLUMNNAME_AD_Task_ID, null);
else
set_Value (COLUMNNAME_AD_Task_ID, Integer.valueOf(AD_Task_ID));
}
/** Get OS Task.
@return Operation System Task
*/
public int getAD_Task_ID ()
{
Integer ii = (Integer)get_Value(COLUM... | if (AD_TaskInstance_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_TaskInstance_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_TaskInstance_ID, Integer.valueOf(AD_TaskInstance_ID));
}
/** Get Task Instance.
@return Task Instance */
public int getAD_TaskInstance_ID ()
{
Integer ii = (Integer)get_Value(CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_TaskInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class H2ConsoleProperties {
/**
* Path at which the console is available.
*/
private String path = "/h2-console";
/**
* Whether to enable the console.
*/
private boolean enabled;
private final Settings settings = new Settings();
public String getPath() {
return this.path;
}
public void set... | public boolean isTrace() {
return this.trace;
}
public void setTrace(boolean trace) {
this.trace = trace;
}
public boolean isWebAllowOthers() {
return this.webAllowOthers;
}
public void setWebAllowOthers(boolean webAllowOthers) {
this.webAllowOthers = webAllowOthers;
}
public @Nullable S... | repos\spring-boot-4.0.1\module\spring-boot-h2console\src\main\java\org\springframework\boot\h2console\autoconfigure\H2ConsoleProperties.java | 2 |
请完成以下Java代码 | public void setDeliveryInfo (final @Nullable String DeliveryInfo)
{
set_Value (COLUMNNAME_DeliveryInfo, DeliveryInfo);
}
@Override
public String getDeliveryInfo()
{
return get_ValueAsString(COLUMNNAME_DeliveryInfo);
}
@Override
public void setDeliveryNote (final @Nullable String DeliveryNote)
{
set_Val... | @Override
public boolean isInitialCare()
{
return get_ValueAsBoolean(COLUMNNAME_IsInitialCare);
}
@Override
public void setIsSeriesOrder (final boolean IsSeriesOrder)
{
set_Value (COLUMNNAME_IsSeriesOrder, IsSeriesOrder);
}
@Override
public boolean isSeriesOrder()
{
return get_ValueAsBoolean(COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_Alberta_Order.java | 1 |
请完成以下Java代码 | public Object invoke(
Bindings bindings,
ELContext context,
Class<?> returnType,
Class<?>[] paramTypes,
Object[] paramValues
) {
return returnType == null ? value : bindings.convert(value, returnType);
}
@Override
public String toString() {
return... | if ((c == '#' || c == '$') && value.charAt(i + 1) == '{') {
b.append('\\');
}
b.append(c);
}
if (end >= 0) {
b.append(value.charAt(end));
}
}
public int getCardinality() {
return 0;
}
public AstNode getChild(int i) {
... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstText.java | 1 |
请完成以下Java代码 | public CountResultDto getBatchesCount(UriInfo uriInfo) {
ProcessEngine processEngine = getProcessEngine();
BatchQueryDto queryDto = new BatchQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
BatchQuery query = queryDto.toQuery(processEngine);
long count = query.count();
return new CountRes... | }
return statisticsResults;
}
@Override
public CountResultDto getStatisticsCount(UriInfo uriInfo) {
BatchStatisticsQueryDto queryDto = new BatchStatisticsQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
BatchStatisticsQuery query = queryDto.toQuery(getProcessEngine());
long count = qu... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\BatchRestServiceImpl.java | 1 |
请完成以下Java代码 | private String getEmail(@NonNull final XmlBody body)
{
if (body.getContact().getEmployee() != null)
if (body.getContact().getEmployee().getOnline() != null)
{
return Joiner
.on("; ")
.join(body.getContact().getEmployee().getOnline().getEmail());
}
return null;
}
@Nullable
private Strin... | private String getExplanation(final XmlBody body)
{
if (body.getRejected() != null)
{
return body.getRejected().getExplanation();
}
return null;
}
@NonNull
private String getRecipient(@NonNull final XmlBody body)
{
return body.getContact().getCompany().getCompanyName();
}
@SuppressWarnings("Unstab... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\invoice\InvoiceImportClientImpl.java | 1 |
请完成以下Java代码 | public void setProcessing (final boolean Processing)
{
set_Value (COLUMNNAME_Processing, Processing);
}
@Override
public boolean isProcessing()
{
return get_ValueAsBoolean(COLUMNNAME_Processing);
}
/**
* WindowType AD_Reference_ID=108
* Reference name: AD_Window Types
*/
public static final int WI... | public void setWinWidth (final int WinWidth)
{
set_Value (COLUMNNAME_WinWidth, WinWidth);
}
@Override
public int getWinWidth()
{
return get_ValueAsInt(COLUMNNAME_WinWidth);
}
@Override
public void setZoomIntoPriority (final int ZoomIntoPriority)
{
set_Value (COLUMNNAME_ZoomIntoPriority, ZoomIntoPriori... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Window.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProductControllerImpl implements ProductController {
@Reference(version = "1.0.0")
private ProductService productService;
@Override
public Result createProduct(ProdInsertReq prodInsertReq) {
//新增产品
return productService.createProduct(prodInsertReq);
}
@Override
... | return productService.deleteCategory(categoryId);
}
@Override
public Result<List<CategoryEntity>> findCategorys(CategoryQueryReq categoryQueryReq) {
return productService.findCategorys(categoryQueryReq);
}
@Override
public Result createBrand(BrandInsertReq brandInsertReq) {
ret... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Controller\src\main\java\com\gaoxi\controller\product\ProductControllerImpl.java | 2 |
请完成以下Java代码 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
@Override
public void setEnvironment(Environment environment) {
if (environment instanceof ConfigurableEnvironment) {
this.environment... | }
} catch (Exception e) {
throw new RuntimeException(e);
}
return beanMetadata;
}
protected Map<String, ServiceBean> getServiceBeansMap() {
return beansOfTypeIncludingAncestors(applicationContext, ServiceBean.class);
}
protected ReferenceAnnotationBeanPos... | repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\actuator\src\main\java\org\apache\dubbo\spring\boot\actuate\endpoint\metadata\AbstractDubboMetadata.java | 1 |
请完成以下Java代码 | public IDatabase createDb(
@NonNull final DBConnectionSettings settings,
@NonNull final String dbName)
{
final IDatabase db = new SQLDatabase(
settings.getDbType(),
settings.getDbHostname(),
settings.getDbPort(),
dbName,
settings.getDbUser(),
settings.getDbPassword());
return db;
}
... | settings.getDbHostname(),
settings.getDbPort(),
dbName,
settings.getDbUser(),
settings.getDbPassword())
{
// @formatter:off
@Override
public IScriptsRegistry getScriptsRegistry()
{
return new IScriptsRegistry()
{
@Override public void markIgnored(final IScript script) { }
... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\DBConnectionMaker.java | 1 |
请完成以下Java代码 | public class PathNode
{
/**
* 节点前驱
*/
public int from;
/**
* 节点在顶点数组中的下标
*/
public int index;
/**
* 构造一个节点
* @param from 节点前驱
* @param index 节点在顶点数组中的下标
*/ | public PathNode(int from, int index)
{
this.from = from;
this.index = index;
}
@Override
public String toString()
{
return "PathNode{" +
"from=" + from +
", index=" + index +
'}';
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\NShort\Path\PathNode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<T> readBulk(Iterable<String> ids) {
final AsyncBucket asyncBucket = bucket.async();
Observable<JsonDocument> asyncOperation = Observable.from(ids).flatMap(new Func1<String, Observable<JsonDocument>>() {
public Observable<JsonDocument> call(String key) {
return asy... | public void updateBulk(Iterable<T> items) {
final AsyncBucket asyncBucket = bucket.async();
Observable.from(items).flatMap(new Func1<T, Observable<JsonDocument>>() {
@SuppressWarnings("unchecked")
@Override
public Observable<JsonDocument> call(final T t) {
... | repos\tutorials-master\persistence-modules\couchbase\src\main\java\com\baeldung\couchbase\async\service\AbstractCrudService.java | 2 |
请完成以下Java代码 | public class TemperatureReading {
private static final int BOILING_TEMPERATURE = 212;
private static final int FREEZING_TEMPERATURE = 32;
@Id
private Long timestamp = System.currentTimeMillis();
@NonNull
private final Integer temperature;
@Transient
public boolean isBoiling() {
Integer temperature = getT... | return temperature != null && temperature <= FREEZING_TEMPERATURE;
}
@Transient
public boolean isNormal() {
return !(isBoiling() || isFreezing());
}
@Override
public String toString() {
return String.format("%d °F", getTemperature());
}
}
// end::class[] | repos\spring-boot-data-geode-main\spring-geode-samples\boot\actuator\src\main\java\example\app\temp\model\TemperatureReading.java | 1 |
请完成以下Java代码 | public TcpConnectionEndPoint setHost(final String hostName)
{
this.hostName = hostName;
return this;
}
public TcpConnectionEndPoint setPort(final int port)
{
this.port = port;
return this;
}
/**
* Timeout for this endpoint for each read, before considering the result to be <code>null</code>. The defau... | public TcpConnectionEndPoint setReadTimeoutMillis(final int readTimeoutMillis)
{
this.readTimeoutMillis = readTimeoutMillis;
return this;
}
@Override
public String toString()
{
return MoreObjects.toStringHelper(this)
.add("hostName", hostName)
.add("port", port)
.toString();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.device.scales\src\main\java\de\metas\device\scales\endpoint\TcpConnectionEndPoint.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: demo-provider
cloud:
# Nacos 作为注册中心的配置项
nacos:
discovery:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
# Dubbo 配置项,对应 DubboConfigurationProperties 类
dubbo:
scan:
base-packages: cn.iocoder.springcloudalibaba.labx7.providerdemo.service # 指定 Dubbo 服务实现类的扫描基准包
... | nfig 类
registry:
address: spring-cloud://127.0.0.1:8848 # 指定 Dubbo 服务注册中心的地址
# Spring Cloud Alibaba Dubbo 专属配置项,对应 DubboCloudProperties 类
cloud:
subscribed-services: '' # 设置订阅的应用列表,默认为 * 订阅所有应用。 | repos\SpringBoot-Labs-master\labx-07-spring-cloud-alibaba-dubbo\labx-07-sca-dubbo-demo01\labx-07-sca-dubbo-demo01-provider\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public class SnmpDeviceTransportConfiguration implements DeviceTransportConfiguration {
private String host;
private Integer port;
private SnmpProtocolVersion protocolVersion;
/*
* For SNMP v1 and v2c
* */
private String community;
/*
* For SNMP v3
* */
private String u... | @JsonIgnore
private boolean isValid() {
boolean isValid = StringUtils.isNotBlank(host) && port != null && protocolVersion != null;
if (isValid) {
switch (protocolVersion) {
case V1:
case V2C:
isValid = StringUtils.isNotEmpty(community);... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\device\data\SnmpDeviceTransportConfiguration.java | 1 |
请完成以下Java代码 | public void setDescription(String description) {
this.description = description;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getCurrency() {
return currency;
}
public void ... | }
public void setImageUrls(List<String> imageUrls) {
this.imageUrls = imageUrls;
}
public List<String> getVideoUrls() {
return videoUrls;
}
public void setVideoUrls(List<String> videoUrls) {
this.videoUrls = videoUrls;
}
public Integer getStock() {
return ... | repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\graphqlvsrest\entity\Product.java | 1 |
请完成以下Java代码 | public byte[] getBytes() {
return bytes;
}
@Override
public void setBytes(byte[] bytes) {
this.bytes = bytes;
}
@Override
public String getDeploymentId() {
return deploymentId;
}
@Override
public void setDeploymentId(String deploymentId) {
this.depl... | return DmnResourceEntityImpl.class;
}
@Override
public boolean isGenerated() {
return false;
}
@Override
public void setGenerated(boolean generated) {
this.generated = generated;
}
// common methods //////////////////////////////////////////////////////////
@O... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\DmnResourceEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class C_Invoice_Candidate_ProcessCaptionMapperHelper
{
private final MoneyService moneyService;
public C_Invoice_Candidate_ProcessCaptionMapperHelper(final MoneyService moneyService)
{
this.moneyService = moneyService;
}
@Nullable
public ProcessCaptionMapper getProcessCaptionMapperForNetAmountsFromQuer... | }
private static ITranslatableString joinAmountsToTranslatableString(final List<Amount> amounts)
{
Check.assumeNotEmpty(amounts, "amounts is not empty");
final TranslatableStringBuilder builder = TranslatableStrings.builder();
for (final Amount amt : amounts)
{
if (!builder.isEmpty())
{
builder.ap... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\process\C_Invoice_Candidate_ProcessCaptionMapperHelper.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Application implements CommandLineRunner {
private static final Logger log = LoggerFactory.getLogger(Application.class);
public static void main(String args[]) {
SpringApplication.run(Application.class, args);
}
@Autowired
JdbcTemplate jdbcTemplate;
@Override
public ... | // Split up the array of whole names into an array of first/last names
List<Object[]> splitUpNames = Arrays.asList("John Woo", "Jeff Dean", "Josh Bloch", "Josh Long").stream()
.map(name -> name.split(" "))
.collect(Collectors.toList());
// Use a Java 8 stream to print ou... | repos\spring-boot-quick-master\quick-jdbc\src\main\java\com\quick\jdbc\Application.java | 2 |
请完成以下Java代码 | public class Population {
private List<Individual> individuals;
public Population(int size, boolean createNew) {
individuals = new ArrayList<>();
if (createNew) {
createNewPopulation(size);
}
}
protected Individual getIndividual(int index) {
return individu... | Individual fittest = individuals.get(0);
for (int i = 0; i < individuals.size(); i++) {
if (fittest.getFitness() <= getIndividual(i).getFitness()) {
fittest = getIndividual(i);
}
}
return fittest;
}
private void createNewPopulation(int size) {
... | repos\tutorials-master\algorithms-modules\algorithms-genetic\src\main\java\com\baeldung\algorithms\ga\binary\Population.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getGroupId() {
return grou... | public List<String> getGroupIds() {
return groupIds;
}
public void setGroupIds(List<String> groupIds) {
this.groupIds = groupIds;
}
@Override
public long executeCount(CommandContext commandContext) {
return CommandContextUtil.getPrivilegeEntityManager(commandContext).findPr... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\PrivilegeQueryImpl.java | 1 |
请完成以下Java代码 | private void consumerLoop(TbQueueConsumer<M> consumer) {
while (!stopped && !consumer.isStopped()) {
try {
List<M> msgs = consumer.poll(pollInterval);
if (msgs.isEmpty()) {
continue;
}
msgPackProcessor.process(msgs, ... | consumer.unsubscribe();
try {
if (consumerTask != null) {
consumerTask.get(10, TimeUnit.SECONDS);
}
} catch (InterruptedException | ExecutionException | TimeoutException e) {
log.error("[{}] Failed to await consumer loop stop", name, e);
}
... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\common\consumer\QueueConsumerManager.java | 1 |
请完成以下Java代码 | public class BadApiRequest {
private long timestamp;
private int status;
private String error;
private String path;
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public int getStatus() {
... | public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-springdoc-2\src\main\java\com\baeldung\cats\model\BadApiRequest.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MovieAtlasSearchController {
@Autowired
private MovieAtlasSearchService service;
@GetMapping("with/{keywords}")
Collection<Document> getMoviesWithKeywords(@PathVariable String keywords) {
return service.moviesByKeywords(keywords);
}
@GetMapping("90s/with/{keywords}/count"... | @GetMapping("90s/{skip}/{limit}/with/{keywords}")
Document getMoviesUsingScoreBoost(@PathVariable int skip, @PathVariable int limit, @PathVariable String keywords) {
return service.late90sMovies(skip, limit, keywords, SearchScore.boost(fieldPath("imdb.votes")));
}
@PostMapping("90s/{skip}/{limit}/w... | repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-3\src\main\java\com\baeldung\boot\atlassearch\web\MovieAtlasSearchController.java | 2 |
请完成以下Java代码 | public <MapperType, ResultType> ResultType executeCustomSql(CustomSqlExecution<MapperType, ResultType> customSqlExecution) {
Class<MapperType> mapperClass = customSqlExecution.getMapperClass();
return commandExecutor.execute(new ExecuteCustomSqlCmd<>(mapperClass, customSqlExecution));
}
@Overri... | }
@Override
public void unacquireAllExternalWorkerJobsForWorker(String workerId) {
commandExecutor.execute(new UnacquireAllExternalWorkerJobsForWorkerCmd(workerId, null, configuration.getJobServiceConfiguration()));
}
@Override
public void unacquireAllExternalWorkerJobsForWorker(St... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ManagementServiceImpl.java | 1 |
请完成以下Java代码 | public void unregisterSeekCallback() {
this.callbackForThread.remove(Thread.currentThread());
}
/**
* Return the callbacks for the specified topic/partition.
* @param topicPartition the topic/partition.
* @return the callbacks (or null if there is no assignment).
* @since 3.3
*/
@Nullable
prot... | /**
* Seek all assigned partitions to the end.
* @since 2.6
*/
public void seekToEnd() {
getCallbacksAndTopics().forEach(ConsumerSeekCallback::seekToEnd);
}
/**
* Seek all assigned partitions to the offset represented by the timestamp.
* @param time the time to seek to.
* @since 2.6
*/
public void ... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\AbstractConsumerSeekAware.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setBuilder(B builder) {
this.securityBuilder = builder;
}
/**
* An {@link ObjectPostProcessor} that delegates work to numerous
* {@link ObjectPostProcessor} implementations.
*
* @author Rob Winch
*/
private static final class CompositeObjectPostProcessor implements ObjectPostProcessor<Object... | if (oppType == null || oppType.isAssignableFrom(object.getClass())) {
object = opp.postProcess(object);
}
}
return object;
}
/**
* Adds an {@link ObjectPostProcessor} to use
* @param objectPostProcessor the {@link ObjectPostProcessor} to add
* @return true if the {@link ObjectPostProcessor}... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\SecurityConfigurerAdapter.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.