instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public void updateCreatedUpdated()
{
final Date now = new Date();
this.dateUpdated = now;
if (dateCreated == null)
{
dateCreated = now;
}
}
@Override
public String toString()
{
final MoreObjects.ToStringHelper toStringHelper = MoreObjects.toStringHelper(this);
toString(toStringHelper);
return t... | public boolean isDeleted()
{
return deleted;
}
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + Objects.hashCode(id);
return result;
}
@Override
public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
if (obj == null)
... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\AbstractEntity.java | 2 |
请完成以下Java代码 | protected Class<TenantEntity> getEntityClass() {
return TenantEntity.class;
}
@Override
protected JpaRepository<TenantEntity, UUID> getRepository() {
return tenantRepository;
}
@Override
public TenantInfo findTenantInfoById(TenantId tenantId, UUID id) {
return DaoUtil.g... | @Override
public EntityType getEntityType() {
return EntityType.TENANT;
}
@Override
public List<TenantId> findTenantIdsByTenantProfileId(TenantProfileId tenantProfileId) {
return tenantRepository.findTenantIdsByTenantProfileId(tenantProfileId.getId()).stream()
.map(Tenan... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\tenant\JpaTenantDao.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public HTRSC1 getHTRSC1() {
return htrsc1;
}
/**
* Sets the value of the htrsc1 property.
*
* @param value
* allowed object is
* {@link HTRSC1 }
*
*/
public void setHTRSC1(HTRSC1 value) {
this.htrsc1 = value;
}
/**
* Gets the va... | * For example, to add a new item, do as follows:
* <pre>
* getDETAIL().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DETAILXbest }
*
*
*/
public List<DETAILXbest> getDETAIL() {
if (detail == ... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_orders\de\metas\edi\esb\jaxb\stepcom\orders\HEADERXbest.java | 2 |
请完成以下Java代码 | public JsonHUConsolidationJobPickingSlotContent execute()
{
final IHUStorageFactory huStorageFactory = handlingUnitsBL.getStorageFactory();
final HUConsolidationJob job = jobRepository.getById(jobId);
if (!job.containsPickingSlotId(pickingSlotId))
{
throw new AdempiereException("Job " + jobId + " does not ... | storages.add(
JsonHUConsolidationJobPickingSlotContent.ItemStorage.builder()
.productName(productName)
.qty(qty.toBigDecimal())
.uom(qty.getUOMSymbol())
.build()
);
}
items.add(
JsonHUConsolidationJobPickingSlotContent.Item.builder()
.huId(huId)
.displ... | repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\commands\get_pickingslot_content\GetPickingSlotContentCommand.java | 1 |
请完成以下Java代码 | public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public String getExceptionType... | return jwt;
}
public void setJwt(String jwt) {
this.jwt = jwt;
}
public Jws<Claims> getJws() {
return jws;
}
public void setJws(Jws<Claims> jws) {
this.jws = jws;
}
} | repos\tutorials-master\security-modules\jjwt\src\main\java\io\jsonwebtoken\jjwtfun\model\JwtResponse.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private List<Candidate> retrieveForQueryBuilder(@NonNull final IQueryBuilder<I_MD_Candidate> queryBuilderWithoutOrdering)
{
final Stream<I_MD_Candidate> candidateRecords = addOrderingYoungestFirst(queryBuilderWithoutOrdering)
.create()
.stream();
return candidateRecords
.map(this::fromCandidateRecordO... | .ppOrderId(ppOrderId)
.build())
.build();
return retrieveOrderedByDateAndSeqNo(query);
}
@NonNull
private static List<TransactionDetail> getTransactionDetails(@NonNull final I_MD_Candidate candidateRecord)
{
final CandidateId candidateId = CandidateId.ofRepoId(candidateRecord.getMD_Candidate_ID());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\CandidateRepositoryRetrieval.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ProcessExtensionRepository processExtensionsRepository(
ProcessExtensionResourceReader processExtensionResourceReader,
DeploymentResourceLoader<ProcessExtensionModel> deploymentResourceLoader,
@Lazy RepositoryService repositoryService
) {
var delegate = new ProcessExtensionRep... | variableTypeMap.put("boolean", new JavaObjectVariableType(Boolean.class));
variableTypeMap.put("string", new JavaObjectVariableType(String.class));
variableTypeMap.put("integer", new JavaObjectVariableType(Integer.class));
variableTypeMap.put("bigdecimal", new BigDecimalVariableType());
... | repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\conf\ProcessExtensionsAutoConfiguration.java | 2 |
请完成以下Java代码 | public void onToDeviceRpcRequest(UUID sessionId, TransportProtos.ToDeviceRpcRequestMsg request) {
log.trace("[{}] Received RPC command to device", sessionId);
try {
parent.getPayloadAdaptor().convertToGatewayPublish(this, getDeviceInfo().getDeviceName(), request).ifPresent(
... | @Override
public void onToServerRpcResponse(TransportProtos.ToServerRpcResponseMsg toServerResponse) {
// This feature is not supported in the TB IoT Gateway yet.
}
@Override
public void onDeviceDeleted(DeviceId deviceId) {
parent.onDeviceDeleted(this.getSessionInfo().getDeviceName());
... | repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\session\AbstractGatewayDeviceSessionContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isPropertySet(@NonNull final String propertyName)
{
return properties.get(propertyName) != null;
}
@Override
public IEditablePricingContext setProperty(@NonNull final String propertyName, @Nullable final Object value)
{
properties.put(propertyName, value);
return this;
}
@Override
public ... | public boolean isSkipCheckingPriceListSOTrxFlag()
{
return skipCheckingPriceListSOTrxFlag;
}
/** If set to not-{@code null}, then the {@link de.metas.pricing.rules.Discount} rule with go with this break as opposed to look for the currently matching break. */
@Override
public IEditablePricingContext setForcePric... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PricingContext.java | 2 |
请完成以下Java代码 | public final class DubboServer implements DisposableBean {
private volatile boolean stopAwait = false;
private volatile Thread awaitThread = null;
public void await() {
try {
this.awaitThread = Thread.currentThread();
while (!this.stopAwait) {
try {
Thread.sleep(10000);
... | }
@Override
public void destroy() throws Exception {
this.stopAwait();
Thread t = this.awaitThread;
if (t != null) {
t.interrupt();
try {
t.join(1000);
} catch (InterruptedException e) {
// Ignored
}
}
}
} | repos\dubbo-spring-boot-starter-master\src\main\java\com\alibaba\dubbo\spring\boot\server\DubboServer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String removeProduct(@RequestParam("id") int id)
{
this.productService.deleteProduct(id);
return "redirect:/admin/products";
}
@PostMapping("products")
public String postproduct() {
return "redirect:/admin/categories";
}
@GetMapping("customers")
public ModelAndView getCustomerDetail() {
ModelA... | public String updateUserProfile(@RequestParam("userid") int userid,@RequestParam("username") String username, @RequestParam("email") String email, @RequestParam("password") String password, @RequestParam("address") String address)
{
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverMana... | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\controller\AdminController.java | 2 |
请完成以下Java代码 | public void setDescription (final @Nullable java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
@Override
public java.lang.String getDescription()
{
return get_ValueAsString(COLUMNNAME_Description);
}
@Override
public de.metas.invoicecandidate.model.I_M_ProductGroup getM_Pr... | public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqN... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\invoicecandidate\model\X_C_Invoice_Candidate_Agg.java | 1 |
请完成以下Java代码 | public ServerFlowConfig getFlowConfig() {
return flowConfig;
}
public ClusterServerModifyRequest setFlowConfig(
ServerFlowConfig flowConfig) {
this.flowConfig = flowConfig;
return this;
}
public ServerTransportConfig getTransportConfig() {
return transportConfig... | this.namespaceSet = namespaceSet;
return this;
}
@Override
public String toString() {
return "ClusterServerModifyRequest{" +
"app='" + app + '\'' +
", ip='" + ip + '\'' +
", port=" + port +
", mode=" + mode +
", flowConfig=" + flow... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\cluster\request\ClusterServerModifyRequest.java | 1 |
请完成以下Java代码 | public BigDecimal getUOM_MultiplierRate()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_UOM_MultiplierRate);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setUPC (final @Nullable java.lang.String UPC)
{
set_Value (COLUMNNAME_UPC, UPC);
}
@Override
public java.lang.String ... | @Override
public void setWeight (final @Nullable BigDecimal Weight)
{
set_Value (COLUMNNAME_Weight, Weight);
}
@Override
public BigDecimal getWeight()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Weight);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setWeightUOM (final... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Product.java | 1 |
请完成以下Java代码 | public static boolean isMonth(final I_C_UOM uom)
{
final X12DE355 x12de355 = X12DE355.ofNullableCode(uom.getX12DE355());
return X12DE355.MONTH.equals(x12de355);
}
public static boolean isWorkMonth(final I_C_UOM uom)
{
final X12DE355 x12de355 = X12DE355.ofNullableCode(uom.getX12DE355());
return X12DE355.MON... | /**
* @return true if is time UOM
*/
public static boolean isTime(final I_C_UOM uom)
{
final X12DE355 x12de355 = X12DE355.ofCode(uom.getX12DE355());
return x12de355.isTemporalUnit();
}
@NonNull
public static TemporalUnit toTemporalUnit(final I_C_UOM uom)
{
final X12DE355 x12de355 = X12DE355.ofCode(uom.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\uom\UOMUtil.java | 1 |
请完成以下Java代码 | private void logAudit(
@Nullable final WFNodeId wfNodeId,
@Nullable final String textMsg)
{
if (Check.isBlank(textMsg))
{
return;
}
context.addEventAudit(WFEventAudit.builder()
.eventType(WFEventAuditType.Trace)
.wfProcessId(getWfProcessId())
.wfNodeId(wfNodeId)
.documentRef(getDocume... | @Nullable
public String getTextMsg() { return state.getTextMsg(); }
private void setTextMsg(@Nullable final String textMsg)
{
state.setTextMsg(textMsg);
}
void addTextMsg(@Nullable final String textMsg)
{
if (textMsg == null || textMsg.isEmpty())
{
return;
}
final String oldText = StringUtils.trim... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\execution\WFProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HUConsolidationJobId implements RepoIdAware
{
int repoId;
private HUConsolidationJobId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, I_M_HU_Consolidation_Job.COLUMNNAME_M_HU_Consolidation_Job_ID);
}
public static HUConsolidationJobId ofRepoId(final int repoId) {return new H... | public static int toRepoId(@Nullable final HUConsolidationJobId id) {return id != null ? id.getRepoId() : -1;}
@JsonValue
public int toJson() {return getRepoId();}
public static boolean equals(@Nullable final HUConsolidationJobId o1, @Nullable final HUConsolidationJobId o2) {return Objects.equals(o1, o2);}
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\HUConsolidationJobId.java | 2 |
请完成以下Java代码 | public boolean supportsParameter(MethodParameter parameter) {
return Principal.class.isAssignableFrom(parameter.getParameterType());
}
@Override
public Object resolveArgument(MethodParameter parameter, DataFetchingEnvironment environment) {
return resolveAuthentication(parameter);
}
@SuppressWarnings("NullA... | Mono<Authentication> authMono =
ReactiveSecurityContextHolder.getContext().mapNotNull(SecurityContext::getAuthentication);
if (isRequired(parameter)) {
authMono = authMono.switchIfEmpty(
Mono.error(new AuthenticationCredentialsNotFoundException("No Authentication")));
}
return authMono;
}
private... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\data\method\annotation\support\PrincipalMethodArgumentResolver.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HttpExecutorAdapter extends AbstractExecutorAdapter {
private void addConfig(HttpRequest request, ExecutorConfig config) {
if (Objects.isNull(config)) {
return;
}
if (MapUtil.isNotEmpty(config.getHeader())) {
request.headerMap(config.getHeader(), true);... | HttpRequest request = HttpUtil.createRequest(Method.valueOf(method.name()), url);
if (MapUtil.isNotEmpty(params)) {
if (HttpMethod.GET.equals(method)) {
request.form(params);
} else if (HttpMethod.POST.equals(method)) {
request.body(JSONUtil.toJsonStr(pa... | repos\spring-boot-quick-master\quick-api-invoker\src\main\java\com\quick\api\invoker\executor\HttpExecutorAdapter.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public Date getLastUpdatedTime() {
return lastUpdatedTime;
}
@Override
public void setLastUpdatedTime(Date la... | return metaInfo;
}
@Override
public void setMetaInfo(String metaInfo) {
this.metaInfo = metaInfo;
}
@Override
public ByteArrayRef getByteArrayRef() {
return byteArrayRef;
}
// common methods //////////////////////////////////////////////////////////
protected Stri... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\persistence\entity\HistoricVariableInstanceEntityImpl.java | 2 |
请完成以下Java代码 | public void setColumns (int Columns)
{
set_Value (COLUMNNAME_Columns, Integer.valueOf(Columns));
}
/** Get Columns.
@return Number of columns
*/
public int getColumns ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Columns);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set POS Key La... | Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_POSKeyLayout.java | 1 |
请完成以下Java代码 | class ElasticsearchDockerComposeConnectionDetailsFactory
extends DockerComposeConnectionDetailsFactory<ElasticsearchConnectionDetails> {
private static final int ELASTICSEARCH_PORT = 9200;
protected ElasticsearchDockerComposeConnectionDetailsFactory() {
super("elasticsearch");
}
@Override
protected Elastics... | return "elastic";
}
@Override
public @Nullable String getPassword() {
return this.environment.getPassword();
}
@Override
public List<Node> getNodes() {
return this.nodes;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-elasticsearch\src\main\java\org\springframework\boot\elasticsearch\docker\compose\ElasticsearchDockerComposeConnectionDetailsFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DateAndSeqNo min(@Nullable final DateAndSeqNo other)
{
if (other == null)
{
return this;
}
else
{
return this.isBefore(other) ? this : other;
}
}
public DateAndSeqNo max(@Nullable final DateAndSeqNo other)
{
if (other == null) | {
return this;
}
return this.isAfter(other) ? this : other;
}
public DateAndSeqNo withOperator(@Nullable final Operator operator)
{
return this
.toBuilder()
.operator(operator)
.build();
}
public static boolean equals(@Nullable final DateAndSeqNo value1, @Nullable final DateAndSeqNo value2) ... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\DateAndSeqNo.java | 2 |
请完成以下Java代码 | public Mono<AuthorizationResult> authorize(Mono<Authentication> authentication, MethodInvocationResult result) {
MethodInvocation mi = result.getMethodInvocation();
ExpressionAttribute attribute = this.registry.getAttribute(mi);
if (attribute == null) {
return Mono.empty();
}
MethodSecurityExpressionHandl... | ExpressionAttribute attribute = this.registry.getAttribute(methodInvocation);
PostAuthorizeExpressionAttribute postAuthorizeAttribute = (PostAuthorizeExpressionAttribute) attribute;
return postAuthorizeAttribute.getHandler().handleDeniedInvocation(methodInvocation, authorizationResult);
}
@Override
public @Null... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\PostAuthorizeReactiveAuthorizationManager.java | 1 |
请完成以下Java代码 | public void setWithoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = withoutTenantId;
}
public Boolean getIncludeEventSubscriptionsWithoutTenantId() {
return includeEventSubscriptionsWithoutTenantId;
}
@CamundaQueryParam(value = "includeEventSubscriptionsWithoutTenantId", converter = Boole... | }
if (activityId != null) {
query.activityId(activityId);
}
if (tenantIdIn != null && !tenantIdIn.isEmpty()) {
query.tenantIdIn(tenantIdIn.toArray(new String[tenantIdIn.size()]));
}
if (TRUE.equals(withoutTenantId)) {
query.withoutTenantId();
}
if (TRUE.equals(includeEventS... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\EventSubscriptionQueryDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<GroupResponse> createGroupResponseList(List<Group> groups) {
RestUrlBuilder urlBuilder = createUrlBuilder();
List<GroupResponse> responseList = new ArrayList<>(groups.size());
for (Group instance : groups) {
responseList.add(createGroupResponse(instance, urlBuilder));
... | public PrivilegeResponse createPrivilegeResponse(Privilege privilege, List<User> users, List<Group> groups) {
PrivilegeResponse response = createPrivilegeResponse(privilege);
List<UserResponse> userResponses = new ArrayList<>(users.size());
for (User user : users) {
userResp... | repos\flowable-engine-main\modules\flowable-idm-rest\src\main\java\org\flowable\idm\rest\service\api\IdmRestResponseFactory.java | 2 |
请完成以下Java代码 | public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public boolean isEnabledForCustomCode() {
return enabledForCustomCode;
}
public void setEnabledForCustomCode(boolean enabledForCustomCode) {
this.enabledForCustomCode = enabl... | return tenantCheckEnabled;
}
public void setTenantCheckEnabled(boolean tenantCheckEnabled) {
this.tenantCheckEnabled = tenantCheckEnabled;
}
@Override
public String toString() {
return joinOn(this.getClass())
.add("enabled=" + enabled)
.add("enabledForCustomCode=" + enabledForCustomCode)... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\AuthorizationProperty.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static Optional<Cookie> getCookie(HttpServletRequest request, String name) {
Cookie[] cookies = request.getCookies();
if (cookies != null && cookies.length > 0) {
for (Cookie cookie : cookies) {
if (cookie.getName().equals(name)) {
return Optional.... | public static String serialize(Object object) {
try {
return Base64.getUrlEncoder()
.encodeToString(OBJECT_MAPPER.writeValueAsBytes(object));
} catch (JsonProcessingException e) {
throw new IllegalArgumentException("The given Json object value: "
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\oauth2\CookieUtils.java | 2 |
请完成以下Java代码 | private String setCustomization()
{
log.info("");
String sql = "UPDATE AD_ChangeLog SET IsCustomization='N' WHERE IsCustomization='Y'";
int resetNo = DB.executeUpdateAndSaveErrorOnFail(sql, get_TrxName());
int updateNo = 0;
// Get Tables
sql = "SELECT * FROM AD_Table t "
// Table with EntityType
+ ... | columnName = "AD_Reference_ID";
update = new StringBuffer ("UPDATE AD_ChangeLog SET IsCustomization='Y' "
+ "WHERE AD_Table_ID=").append(table.getAD_Table_ID());
update.append (" AND Record_ID IN (SELECT ")
.append (columnName)
.append (" FROM ").append(tableName)
.append (" WHERE EntityType... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\ChangeLogProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getAuthoritiesClaimName() {
return authoritiesClaimName;
}
public void setAuthoritiesClaimName(String authoritiesClaimName) {
this.authoritiesClaimName = authoritiesClaimName;
}
public String getAuthoritiesPrefix() {
return authoritiesPrefix;
}
public voi... | public void setPrincipalClaimName(String principalClaimName) {
this.principalClaimName = principalClaimName;
}
public Map<String,String> getScopes() {
return scopes;
}
public void setScopes(Map<String,String> scopes) {
this.scopes = scopes;
}
} | repos\tutorials-master\spring-security-modules\spring-security-oidc\src\main\java\com\baeldung\openid\oidc\jwtauthorities\config\JwtMappingProperties.java | 2 |
请完成以下Java代码 | public AttributeListValue retrieveAttributeValue(final Properties ctx, @NonNull final I_C_Country country, final boolean includeInactive)
{
final String countryValue = country.getCountryCode();
if (Check.isEmpty(countryValue, true))
{
return null;
}
final Attribute countryAttribute = retrieveCountryAttri... | final AttributeId countryAttributeId = retrieveCountryAttributeId(adClientId, adOrgId);
if (countryAttributeId == null)
{
return null;
}
return Services.get(IAttributeDAO.class).getAttributeById(countryAttributeId);
}
@Override
public AttributeId retrieveCountryAttributeId(final int adClientId, final in... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\mm\attributes\countryattribute\impl\CountryAttributeDAO.java | 1 |
请完成以下Java代码 | private static class HULabelConfigProvider
{
private final HULabelService huLabelService;
private final HashMap<HULabelConfigQuery, ExplainedOptional<HULabelConfig>> cache = new HashMap<>();
private HULabelConfigProvider(final HULabelService huLabelService)
{
this.huLabelService = huLabelService;
}
p... | }
final BatchToPrint lastBatch = !batches.isEmpty() ? batches.get(batches.size() - 1) : null;
final BatchToPrint batch;
if (lastBatch == null || !lastBatch.isMatching(labelConfig))
{
batch = new BatchToPrint(labelConfig.getPrintFormatProcessId());
batches.add(batch);
}
else
{
batch = ... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\printReceivedHUQRCodes\PrintReceivedHUQRCodesActivityHandler.java | 1 |
请完成以下Java代码 | public void onStateTransition(CommandContext commandContext, DelegatePlanItemInstance planItemInstance, String transition) {
}
@Override
public void onParentEnd(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity, String parentEndTransition, String exitEventType) {
... | protected String getExpressionValue(String value, PlanItemInstanceEntity planItemInstanceEntity, ExpressionManager expressionManager) {
Object expressionValue = expressionManager.createExpression(value).getValue(planItemInstanceEntity);
if (expressionValue != null) {
return expressionValue.t... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\CasePageTaskActivityBehaviour.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_M_MovementLine getPickFrom_MovementLine()
{
return get_ValueAsPO(COLUMNNAME_PickFrom_MovementLine_ID, org.compiere.model.I_M_MovementLine.class);
}
@Override
public void setPickFrom_MovementLine(final org.compiere.model.I_M_MovementLine PickFrom_MovementLine)
{
set_ValueFromPO(COLU... | set_ValueNoCheck (COLUMNNAME_QtyToPick, QtyToPick);
}
@Override
public BigDecimal getQtyToPick()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToPick);
return bd != null ? bd : BigDecimal.ZERO;
}
/**
* RejectReason AD_Reference_ID=541422
* Reference name: QtyNotPicked RejectReason
*/
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_DD_OrderLine_HU_Candidate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class IssueRawMaterialsCommand
{
// Services
@NonNull private static final Logger logger = LogManager.getLogger(IssueRawMaterialsCommand.class);
@NonNull private final ITrxManager trxManager;
@NonNull private final PPOrderIssueScheduleService ppOrderIssueScheduleService;
@NonNull private final Manufacturing... | (step) -> {
if (processed)
{
// shall not happen
logger.warn("Ignoring request because was already processed: request={}, step={}", request, step);
return step;
}
return issueToStep(step);
});
if (!processed)
{
throw new AdempiereException("Failed fulfilling issue reque... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\issue\IssueRawMaterialsCommand.java | 2 |
请完成以下Java代码 | public I_AD_WF_Node getAD_WF_Node() throws RuntimeException
{
return (I_AD_WF_Node)MTable.get(getCtx(), I_AD_WF_Node.Table_Name)
.getPO(getAD_WF_Node_ID(), get_TrxName()); }
/** Set Node.
@param AD_WF_Node_ID
Workflow Node (activity), step or process
*/
public void setAD_WF_Node_ID (int AD_WF_Node_I... | /** Get Workflow Node Asset.
@return Workflow Node Asset */
public int getPP_WF_Node_Asset_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PP_WF_Node_Asset_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_WF_Node_Asset.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserBizException extends BizException {
/**
*
*/
private static final long serialVersionUID = -6402548375645868682L;
/** 用户不存在 **/
public static final int USER_IS_NULL = 101;
/** 用户支付配置有误 **/
public static final int USER_PAY_CONFIG_ERRPR = 102;
public static final UserBiz... | public UserBizException() {
}
public UserBizException(int code, String msgFormat, Object... args) {
super(code, msgFormat, args);
}
public UserBizException(int code, String msg) {
super(code, msg);
}
public UserBizException print() {
LOG.info("==>BizException, code:" +... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\exception\UserBizException.java | 2 |
请完成以下Java代码 | public static MainPart getMainPart(String sentence, String delimiter)
{
List<Word> wordList = new LinkedList<>();
for (String word : sentence.split(delimiter))
{
wordList.add(new Word(word));
}
return getMainPart(wordList);
}
/**
* 调用演示
* @param... | mpTest();
}
public static void mpTest(){
String[] testCaseArray = {
"我一直很喜欢你",
"你被我喜欢",
"美丽又善良的你被卑微的我深深的喜欢着……",
"小米公司主要生产智能手机",
"他送给了我一份礼物",
"这类算法在有限的一段时间内终止",
"如果大海能够带走我的哀愁",
... | repos\springboot-demo-master\neo4j\src\main\java\com\et\neo4j\hanlp\MainPartExtractor.java | 1 |
请完成以下Java代码 | public int getArrayList() {
return arrayList.get(getValue);
}
@Benchmark
public int getTroveIntList() {
return tList.get(getValue);
}
@Benchmark
public int getColtIntList() {
return coltList.get(getValue);
}
@Benchmark
public int getFastUtilIntList() {
... | public boolean containsColtIntList() {
return coltList.contains(getValue);
}
@Benchmark
public boolean containsFastUtilIntList() {
return fastUtilList.contains(getValue);
}
public static void main(String[] args) throws Exception {
Options options = new OptionsBuilder()
... | repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\list\primitive\PrimitivesListPerformance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setIncludeCaseVariablesNames(Collection<String> includeCaseVariablesNames) {
this.includeCaseVariablesNames = includeCaseVariablesNames;
}
@JsonTypeInfo(use = Id.CLASS, defaultImpl = QueryVariable.class)
public List<QueryVariable> getVariables() {
return variables;
}
pu... | }
public Boolean getWithoutTenantId() {
return withoutTenantId;
}
public void setWithoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = withoutTenantId;
}
public Boolean getWithoutCaseInstanceParentId() {
return withoutCaseInstanceParentId;
}
pu... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\caze\HistoricCaseInstanceQueryRequest.java | 2 |
请完成以下Java代码 | private static final class VersionQualifierComparator implements Comparator<Qualifier> {
static final String RELEASE = "RELEASE";
static final String BUILD_SNAPSHOT = "BUILD-SNAPSHOT";
static final String SNAPSHOT = "SNAPSHOT";
static final String MILESTONE = "M";
static final String RC = "RC";
static fin... | return firstVersion.compareTo(secondVersion);
}
private static int compareQualifier(Qualifier first, Qualifier second) {
int firstIndex = getQualifierIndex(first.getId());
int secondIndex = getQualifierIndex(second.getId());
// Unknown qualifier, alphabetic ordering
if (firstIndex == -1 && secondIndex... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\version\Version.java | 1 |
请完成以下Java代码 | public String getDiagramResourceName() {
return diagramResourceName;
}
public void setDiagramResourceName(String diagramResourceName) {
this.diagramResourceName = diagramResourceName;
}
public boolean hasStartFormKey() {
return hasStartFormKey;
}
public boolean getHasS... | this.suspensionState = suspensionState;
}
public boolean isSuspended() {
return suspensionState == SuspensionState.SUSPENDED.getStateCode();
}
public String getEngineVersion() {
return engineVersion;
}
public void setEngineVersion(String engineVersion) {
this.engineVer... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionEntityImpl.java | 1 |
请完成以下Java代码 | public class BlobStringConverter {
/**
* Converts a java.sql.Blob object to a String using UTF-8 encoding.
* @param blob The Blob object to convert.
* @return The String representation of the Blob data.
* @throws SQLException If a database access error occurs.
*/
public static String b... | /**
* Converts a String object to a java.sql.Blob using UTF-8 encoding.
* @param text The String to convert.
* @return A SerialBlob object containing the String data.
* @throws SQLException If a database access error occurs.
*/
public static Blob stringToBlob(String text) throws SQLExceptio... | repos\tutorials-master\core-java-modules\core-java-string-conversions-4\src\main\java\com\baeldung\blobstringconverter\BlobStringConverter.java | 1 |
请完成以下Java代码 | public void setTitle(String title) {
this.title = title;
}
public String getIsbn() {
return isbn;
}
public void setIsbn(String isbn) {
this.isbn = isbn;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = n... | public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", name=" + name + ", title=" + title
+ ", isbn=" + isbn + ", price=" + price + '}';
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootDeadlockExample\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public static HUPIItemProductId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? ofRepoId(repoId) : null;
}
public static HUPIItemProductId ofRepoIdOrNone(final int repoId)
{
return repoId > 0 ? ofRepoId(repoId) : VIRTUAL_HU;
}
public static Optional<HUPIItemProductId> optionalOfRepoId(final int repoI... | @JsonValue
@Override
public int getRepoId()
{
return repoId;
}
public static boolean equals(@Nullable final HUPIItemProductId id1, @Nullable final HUPIItemProductId id2)
{
return Objects.equals(id1, id2);
}
public static HUPIItemProductId nullToVirtual(final HUPIItemProductId id)
{
return id != null ? ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\handlingunits\HUPIItemProductId.java | 1 |
请完成以下Java代码 | public void setB_BuyerFunds_ID (int B_BuyerFunds_ID)
{
if (B_BuyerFunds_ID < 1)
set_Value (COLUMNNAME_B_BuyerFunds_ID, null);
else
set_Value (COLUMNNAME_B_BuyerFunds_ID, Integer.valueOf(B_BuyerFunds_ID));
}
/** Get Buyer Funds.
@return Buyer Funds for Bids on Topics
*/
public int getB_BuyerFunds_I... | */
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Private Note.
@param PrivateNote
Private Note - not visible to the other parties
*/
public void setPrivateNote (String PrivateNote)
{
set_Value (COLUMNNAME_PrivateNote, PrivateNote);
}
/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Bid.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: publisher-demo
# RabbitMQ 相关配置项
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
# Bus 相关配置项,对应 BusProperties
cloud:
bus:
| enabled: true # 是否开启,默认为 true
destination: springCloudBus # 目标消息队列,默认为 springCloudBus | repos\SpringBoot-Labs-master\labx-18\labx-18-sc-bus-rabbitmq-demo-publisher\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((country_id == null) ? 0 : country_id.hashCode());
result = prime * result + ((probability == null) ? 0 : probability.hashCode());
return result;
}
@Override
public boolean equal... | return false;
if (probability == null) {
if (other.probability != null)
return false;
} else if (!probability.equals(other.probability))
return false;
return true;
}
@Override
public String toString() {
return "NameCountryModel [countr... | repos\tutorials-master\spring-web-modules\spring-thymeleaf-attributes\accessing-session-attributes\src\main\java\com\baeldung\accesing_session_attributes\business\entities\NameCountryEntity.java | 1 |
请完成以下Java代码 | public PublicKeyCredentialBuilder response(R response) {
this.response = response;
return this;
}
/**
* Sets the {@link #getAuthenticatorAttachment()} property.
* @param authenticatorAttachment the authenticator attachement
* @return the PublicKeyCredentialBuilder
*/
public PublicKeyCredentialB... | public PublicKeyCredentialBuilder clientExtensionResults(
AuthenticationExtensionsClientOutputs clientExtensionResults) {
this.clientExtensionResults = clientExtensionResults;
return this;
}
/**
* Creates a new {@link PublicKeyCredential}
* @return a new {@link PublicKeyCredential}
*/
public P... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredential.java | 1 |
请完成以下Java代码 | public boolean isAnd() {
return and;
}
public void setAnd(boolean and) {
this.and = and;
}
public boolean isAndAlphabetic() {
return andAlphabetic;
}
public void setAndAlphabetic(boolean andAlphabetic) {
this.andAlphabetic = andAlphabetic;
}
public boo... | }
public void setNotAlphabetic(boolean notAlphabetic) {
this.notAlphabetic = notAlphabetic;
}
@Override
public String toString() {
return "SpelLogical{" +
"and=" + and +
", andAlphabetic=" + andAlphabetic +
", or=" + or +
... | repos\tutorials-master\spring-spel\src\main\java\com\baeldung\spring\spel\examples\SpelLogical.java | 1 |
请完成以下Java代码 | private static @NonNull ResponseEntity<JsonGetSingleHUResponse> toBadRequestResponseEntity(final Exception e)
{
final String adLanguage = Env.getADLanguageOrBaseLanguage();
return ResponseEntity.badRequest().body(JsonGetSingleHUResponse.ofError(JsonErrors.ofThrowable(e, adLanguage)));
}
private JsonHUAttribute ... | private static JsonHUType toJsonHUType(@NonNull final HUQRCodeUnitType huUnitType)
{
switch (huUnitType)
{
case LU:
return JsonHUType.LU;
case TU:
return JsonHUType.TU;
case VHU:
return JsonHUType.CU;
default:
throw new AdempiereException("Unknown HU Unit Type: " + huUnitType);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.mobileui\src\main\java\de\metas\handlingunits\rest_api\HandlingUnitsRestController.java | 1 |
请完成以下Java代码 | public int getM_AttributeSetInstance_ID()
{
return inoutLine.getM_AttributeSetInstance_ID();
}
@Override
public void setM_AttributeSetInstance_ID(final int M_AttributeSetInstance_ID)
{
inoutLine.setM_AttributeSetInstance_ID(M_AttributeSetInstance_ID);
}
@Override
public int getC_UOM_ID()
{
return inout... | 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(i... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\InOutLineHUPackingAware.java | 1 |
请完成以下Java代码 | public void setIsTaxBoilerPlateMatch (final boolean IsTaxBoilerPlateMatch)
{
set_Value (COLUMNNAME_IsTaxBoilerPlateMatch, IsTaxBoilerPlateMatch);
}
@Override
public boolean isTaxBoilerPlateMatch()
{
return get_ValueAsBoolean(COLUMNNAME_IsTaxBoilerPlateMatch);
}
@Override
public void setIsTaxIdMatch (fina... | {
if (Run_Tax_ID < 1)
set_Value (COLUMNNAME_Run_Tax_ID, null);
else
set_Value (COLUMNNAME_Run_Tax_ID, Run_Tax_ID);
}
@Override
public int getRun_Tax_ID()
{
return get_ValueAsInt(COLUMNNAME_Run_Tax_ID);
}
@Override
public void setRun_Tax_Lookup_Log (final @Nullable java.lang.String Run_Tax_Lookup... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Verification_RunLine.java | 1 |
请完成以下Java代码 | public class RecordSO {
private long id;
private String firstName;
private String lastName;
private String randomNum;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
... | return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getRandomNum() {
return randomNum;
}
public void setRandomNum(String randomNum) {
this.randomNum = randomNum;
}
@Override
public String toString() {
... | repos\spring-boot-quick-master\quick-batch\src\main\java\com\quick\batch\model\RecordSO.java | 1 |
请完成以下Java代码 | public class Timeslot {
@PlanningId
private String id;
private DayOfWeek dayOfWeek;
private LocalTime startTime;
private LocalTime endTime;
public Timeslot() {
}
public Timeslot(String id, DayOfWeek dayOfWeek, LocalTime startTime, LocalTime endTime) {
this.id = id;
th... | // Getters and setters
// ************************************************************************
public String getId() {
return id;
}
public DayOfWeek getDayOfWeek() {
return dayOfWeek;
}
public LocalTime getStartTime() {
return startTime;
}
public LocalTime... | repos\springboot-demo-master\Timefold Solver\src\main\java\org\acme\schooltimetabling\domain\Timeslot.java | 1 |
请完成以下Java代码 | public void setQtyTU(final BigDecimal qtyTU)
{
this.qtyTU = qtyTU;
}
public void setQtyLU(final BigDecimal qtyLU)
{
this.qtyLU = qtyLU;
}
private boolean getIsReceiveIndividualCUs()
{
if (isReceiveIndividualCUs == null)
{
isReceiveIndividualCUs = computeIsReceiveIndividualCUs();
}
return isRecei... | }
private boolean computeIsReceiveIndividualCUs()
{
if (selectedRow.getType() != PPOrderLineType.MainProduct
|| selectedRow.getUomId() == null
|| !selectedRow.getUomId().isEach())
{
return false;
}
return Optional.ofNullable(selectedRow.getOrderId())
.flatMap(ppOrderBOMBL::getSerialNoSequence... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\PackingInfoProcessParams.java | 1 |
请完成以下Java代码 | protected HistoricVariableInstanceQuery baseQuery() {
return getEngine().getHistoryService().createHistoricVariableInstanceQuery().variableId(getId());
}
@Override
protected Query<HistoricVariableInstanceQuery, HistoricVariableInstance> baseQueryForBinaryVariable() {
return baseQuery().disableCustomObjec... | @Override
protected String getResourceNameForErrorMessage() {
return "Historic variable instance";
}
@Override
public Response deleteVariableInstance() {
try {
getEngine().getHistoryService().deleteHistoricVariableInstance(id);
} catch (NotFoundException nfe) { // rewrite status code from b... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\history\impl\HistoricVariableInstanceResourceImpl.java | 1 |
请完成以下Java代码 | public void setP_Revenue_Acct (int P_Revenue_Acct)
{
set_ValueNoCheck (COLUMNNAME_P_Revenue_Acct, Integer.valueOf(P_Revenue_Acct));
}
/** Get Product Revenue.
@return Account for Product Revenue (Sales Account)
*/
public int getP_Revenue_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_P_Revenue_Acc... | }
/** Get Total Amount.
@return Total Amount
*/
public BigDecimal getTotalAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalAmt);
if (bd == null)
return Env.ZERO;
return bd;
}
public I_C_ValidCombination getUnEarnedRevenue_A() throws RuntimeException
{
return (I_C_ValidCombinat... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RevenueRecognition_Plan.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UserVO get(@RequestParam("id") Integer id) {
// 查询并返回用户
return new UserVO().setId(id).setUsername(UUID.randomUUID().toString());
}
/**
* 添加用户
*
* @param addDTO 添加用户信息 DTO
* @return 添加成功的用户编号
*/
@PostMapping("add") // URL 修改成 /add
public Integer add(UserAd... | return success;
}
/**
* 删除指定用户编号的用户
*
* @param id 用户编号
* @return 是否删除成功
*/
@DeleteMapping("/delete") // URL 修改成 /delete ,RequestMethod 改成 DELETE
public Boolean delete(@RequestParam("id") Integer id) {
// 删除用户记录
Boolean success = false;
// 返回是否更新成功
... | repos\SpringBoot-Labs-master\lab-23\lab-springmvc-23-01\src\main\java\cn\iocoder\springboot\lab23\springmvc\controller\UserController2.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class Author {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String name;
@OneToMany(mappedBy = "author", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
private List<Article> articles;
public Long getId() {
retu... | return name;
}
public void setName(String name) {
this.name = name;
}
public List<Article> getArticles() {
return articles;
}
public void setArticles(List<Article> articles) {
this.articles = articles;
}
} | repos\tutorials-master\persistence-modules\hibernate6\src\main\java\com\baeldung\statelesssession\Author.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Used to identify... | * {@link String }
*
*/
public String getIdentificationType() {
return identificationType;
}
/**
* Sets the value of the identificationType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIde... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\FurtherIdentificationType.java | 2 |
请完成以下Java代码 | public void setName (final @Nullable java.lang.String Name)
{
set_ValueNoCheck (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setPlannedAmt (final BigDecimal PlannedAmt)
{
set_ValueNoCheck (COLUMNNAME_PlannedA... | set_ValueNoCheck (COLUMNNAME_PlannedQty, PlannedQty);
}
@Override
public BigDecimal getPlannedQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PlannedQty);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setProductValue (final @Nullable java.lang.String ProductValue)
{
s... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_Details_v.java | 1 |
请完成以下Java代码 | protected void postInitialize(ExecutionEntity execution, TimerEntity timer) {
initializeConfiguration(execution, timer);
}
protected String prepareRepeat(String dueDate) {
if (dueDate.startsWith("R")) {
return TimerEntity.replaceRepeatCycleAndDate(dueDate);
}
return dueDate;
}
public Tim... | /**
* @return all timers declared in the given scope
*/
public static Map<String, TimerDeclarationImpl> getDeclarationsForScope(PvmScope scope) {
if (scope == null) {
return Collections.emptyMap();
}
Map<String, TimerDeclarationImpl> result = scope.getProperties().get(BpmnProperties.TIMER_DEC... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\TimerDeclarationImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | RegionConfigurer interestRegisteringRegionConfigurer() {
return new RegionConfigurer() {
@Override
@SuppressWarnings("unchecked")
public void configure(String beanName, ClientRegionFactoryBean<?, ?> clientRegion) {
Interest interest = new RegexInterest(".*", InterestResultPolicy.NONE,
false, true... | new AbstractCommonEventProcessingCacheListener() {
@Override
protected void processEntryEvent(EntryEvent event, EntryEventType eventType) {
if (event.isOriginRemote()) {
System.err.printf("[%1$s] EntryEvent for [%2$s] with value [%3$s]%n",
event.getKey(), event.getOperation(), event.get... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\near\src\main\java\example\app\caching\near\client\config\GeodeConfiguration.java | 2 |
请完成以下Java代码 | public class MetaAnnotationMatchingPointcut implements Pointcut {
private final ClassFilter classFilter;
private final MethodMatcher methodMatcher;
/**
* Create a new MetaAnnotationMatchingPointcut for the given annotation type.
*
* @param classAnnotationType the annotation type to look for at the class le... | } else {
this.classFilter = ClassFilter.TRUE;
}
if (methodAnnotationType != null) {
this.methodMatcher = new MetaAnnotationMethodMatcher(methodAnnotationType);
} else {
this.methodMatcher = MethodMatcher.TRUE;
}
}
public ClassFilter getClassFilter() {
return this.classFilter;
}
public MethodM... | repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\aop\util\MetaAnnotationMatchingPointcut.java | 1 |
请完成以下Java代码 | public Optional<IQuery<I_C_Queue_WorkPackage>> createQuery(final Properties workPackageCtx, @Nullable final QueryLimit limit)
{
//
// Filter out processors which were temporary blacklisted
final Set<QueuePackageProcessorId> availablePackageProcessorIds = packageProcessorIds
.stream()
.filter(packageProce... | UnsupportedOperationException.class,
"Queue {} has no EnqueuingProcessorInternalName. It was problably not intended for enqueuing, but for queue processing",
this);
return enquingPackageProcessorInternalName;
}
@Override
public IWorkPackageBuilder newWorkPackage()
{
return newWorkPackage(ctx);
}
@O... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageQueue.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Employee> getMainEmployees() {
return mainEmployees;
... | this.additionalEmployees = additionalEmployees;
}
public void addMainEmployee(Employee employee) {
if (this.mainEmployees == null) {
this.mainEmployees = new ArrayList<>();
}
this.mainEmployees.add(employee);
}
public void addSubEmployee(Employee employee) {
... | repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\lazycollection\model\Branch.java | 1 |
请完成以下Java代码 | public String getOperationType() {
return operationType;
}
public void setOperationType(String operationType) {
this.operationType = operationType;
}
public String getAssignerId() {
return assignerId;
}
public void setAssignerId(String assignerId) {
this.assignerId = assignerId;
} | public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceI... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricIdentityLinkLogEventEntity.java | 1 |
请完成以下Java代码 | Condition newCondition() {
return new ConditionObject();
}
}
// 仅需要将操作代理到Sync上即可
private final Sync sync = new Sync();
@Override
public void lock() {
sync.acquire(1);
}
@Override
public void lockInterruptibly() throws InterruptedException {
sync.acq... | @Override
public void unlock() {
sync.release(0);
}
@Override
public Condition newCondition() {
return sync.newCondition();
}
public static void main(String[] args) {
MutexLock lock = new MutexLock();
final User user = new User();
for (int i = 0; i < 10... | repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\MutexLock.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class PropagationWithoutBaggage {
@Bean
@ConditionalOnEnabledTracingExport
TextMapPropagator textMapPropagator(TracingProperties properties) {
return CompositeTextMapPropagator.create(properties.getPropagation(), null);
}
}
/**
* Propagates traces and baggage.
*/
@Configuration(proxyBeanMeth... | }
@Bean
@ConditionalOnMissingBean
@ConditionalOnBooleanProperty(name = "management.tracing.baggage.correlation.enabled", matchIfMissing = true)
Slf4JBaggageEventListener otelSlf4JBaggageEventListener() {
return new Slf4JBaggageEventListener(this.tracingProperties.getBaggage().getCorrelation().getFields());
... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-opentelemetry\src\main\java\org\springframework\boot\micrometer\tracing\opentelemetry\autoconfigure\OpenTelemetryPropagationConfigurations.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public BlobStore blobStore() {
Properties properties = new Properties();
properties.setProperty("jclouds.filesystem.basedir", storageProperties.getLocalFileBaseDirectory());
return ContextBuilder
.newBuilder("filesystem")
.overrides(properties)
.build(BlobStor... | .blobStore(blobStore)
.endpoint(URI.create(storageProperties.getProxyEndpoint()))
.build();
}
@Bean
public S3Client s3Client() {
return S3Client
.builder()
.region(Region.US_EAST_1)
.endpointOverride(URI.create(storageProperties.getProxyEn... | repos\tutorials-master\aws-modules\s3proxy\src\main\java\com\baeldung\s3proxy\LocalStorageConfiguration.java | 2 |
请完成以下Java代码 | public void setText(String mnemonicLabel) {
super.setText(createMnemonic(mnemonicLabel));
} // setText
/**
* Create Mnemonics of text containing "&". Based on MS notation of &Help =>
* H is Mnemonics Creates ALT_
*
* @param text
* test with Mnemonics
* @return text w/o &
*/
private Strin... | * @param mnemonic
* The mnemonic character code.
*/
@Override
public void setMnemonic(int mnemonic) {
super.setMnemonic(mnemonic);
InputMap map = SwingUtilities.getUIInputMap(this,
JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map == null) {
map = new ComponentInputMapUIResource(this);
Swin... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CCheckBox.java | 1 |
请完成以下Java代码 | public DecimalFormat getDecimalFormat()
{
return m_format;
}
// metas: end
// metas
@Override
public void addMouseListener(MouseListener l)
{
m_text.addMouseListener(l);
}
/**
* This implementation always returns true.
*/
// task 05005
@Override
public boolean isRealChange(final PropertyChangeEve... | // Effect of NOT doing this: when in JTable, user presses a key (e.g. a digit) to start editing but the first key he pressed gets lost here.
if (m_text != null && condition == WHEN_FOCUSED)
{
// Usually the text component does not have focus yet but it was requested, so, considering that:
// * we are requesti... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VNumber.java | 1 |
请完成以下Java代码 | public ProjectBuilder addDependency(String groupId, String artifactId, String version) {
Dependency dependency = new Dependency();
dependency.setGroupId(groupId);
dependency.setArtifactId(artifactId);
dependency.setVersion(version);
dependencies.add(dependency);
return th... | private static String generateMainClass(String packageName) {
return packageName + ";\n" +
"\n" +
"public class Main {\n" +
" public static void main(String[] args){\n" +
" System.out.println(\"Hello World!\");\n" +
" }\n" +
... | repos\tutorials-master\maven-modules\maven-exec-plugin\src\main\java\com\baeldung\learningplatform\ProjectBuilder.java | 1 |
请完成以下Java代码 | public class Graph {
private List<Vertex> vertices;
public Graph() {
this.vertices = new ArrayList<>();
}
public Graph(List<Vertex> vertices) {
this.vertices = vertices;
}
public void addVertex(Vertex vertex) {
this.vertices.add(vertex);
}
public void addEdge... | }
return false;
}
public boolean hasCycle(Vertex sourceVertex) {
sourceVertex.setBeingVisited(true);
for (Vertex neighbour : sourceVertex.getAdjacencyList()) {
if (neighbour.isBeingVisited()) {
// backward edge exists
return true;
... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-3\src\main\java\com\baeldung\algorithms\graphcycledetection\domain\Graph.java | 1 |
请完成以下Java代码 | private CostAmount getLaborCost(final AcctSchema as)
{
String sql = "SELECT ConvertedAmt, Qty" +
" FROM " + I_S_TimeExpenseLine.Table_Name +
" WHERE S_TimeExpenseLine.S_TimeExpenseLine_ID = ?";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
pstmt = DB.prepareStatement(sql, ITrx.TRXNAME... | {
DB.close(rs, pstmt);
pstmt = null;
rs = null;
}
} // getLaborCost
@NonNull
private Account getProjectAccount(final ProjectAccountType acctType, final AcctSchema as)
{
final ProjectId projectId = getC_Project_ID();
if (projectId == null)
{
throw new AdempiereException("Project not set");
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_ProjectIssue.java | 1 |
请完成以下Java代码 | private synchronized void load(final InboundEMailConfig config)
{
final IntegrationFlow flow = createIntegrationFlow(config);
flowContext.registration(flow)
.id(toFlowId(config.getId()))
.register();
loadedConfigs.put(config.getId(), config);
logger.info("Loaded inbound mail for {}", config);
}
p... | .embeddedPartsAsBytes(false)
.headerMapper(InboundEMailHeaderAndContentMapper.newInstance()))
.handle(InboundEMailMessageHandler.builder()
.config(config)
.emailService(emailService)
.build())
.get();
}
@Override
public void onInboundEMailConfigChanged(final Set<InboundEMailConfigId>... | repos\metasfresh-new_dawn_uat\backend\de.metas.inbound.mail\src\main\java\de\metas\inbound\mail\InboundEMailServer.java | 1 |
请完成以下Java代码 | public class GenericReactiveWebApplicationContext extends GenericApplicationContext
implements ConfigurableReactiveWebApplicationContext {
/**
* Create a new {@link GenericReactiveWebApplicationContext}.
* @see #registerBeanDefinition
* @see #refresh
*/
public GenericReactiveWebApplicationContext() {
}
... | super(beanFactory);
}
@Override
protected ConfigurableEnvironment createEnvironment() {
return new StandardReactiveWebEnvironment();
}
@Override
protected Resource getResourceByPath(String path) {
// We must be careful not to expose classpath resources
return new FilteredReactiveWebContextResource(path);
... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\context\reactive\GenericReactiveWebApplicationContext.java | 1 |
请完成以下Java代码 | public void setSearchTimeLimit(int searchTimeLimit) {
this.searchControls.setTimeLimit(searchTimeLimit);
}
/**
* Specifies the attributes that will be returned as part of the search.
* <p>
* null indicates that all attributes will be returned. An empty array indicates no
* attributes are returned.
* @par... | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName()).append(" [");
sb.append("searchFilter=").append(this.searchFilter).append("; ");
sb.append("searchBase=").append(this.searchBase).append("; ");
sb.append("scope=")
.append((this.searchControl... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\search\FilterBasedLdapUserSearch.java | 1 |
请完成以下Java代码 | public void setProcessed (boolean Processed)
{
set_ValueNoCheck (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Bo... | {
return (Timestamp)get_Value(COLUMNNAME_ServiceDate);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), String.valueOf(getServiceDate()));
}
/** Set Quantity Provided.
@param ServiceLevelPro... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ServiceLevelLine.java | 1 |
请完成以下Java代码 | public <T extends TypedValue> T getVariableTyped(String variableName) {
return getVariableTyped(variableName, true);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@JsonIgnore
@Override
public <T extends TypedValue> T getVariableTyped(String variableName, boolean deserializeObjectValues) {
TypedVal... | + "errorMessage=" + errorMessage + ", "
+ "executionId=" + executionId + ", "
+ "id=" + id + ", "
+ formatTimeField("lockExpirationTime", lockExpirationTime) + ", "
+ formatTimeField("createTime", createTime) + ", "
+ "priority=" + priority + ", "
+ "processDefinitionId="... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\task\impl\ExternalTaskImpl.java | 1 |
请完成以下Java代码 | public ProcessInstanceBuilder fallbackToDefaultTenant() {
this.fallbackToDefaultTenant = true;
return this;
}
@Override
public ProcessInstance start() {
return runtimeService.startProcessInstance(this);
}
@Override
public ProcessInstance startAsync() {
return ru... | }
public String getOwnerId() {
return ownerId;
}
public String getAssigneeId() {
return assigneeId;
}
public Map<String, Object> getVariables() {
return variables;
}
public Map<String, Object> getTransientVariables() {
return transientVariables;
}
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\runtime\ProcessInstanceBuilderImpl.java | 1 |
请完成以下Java代码 | protected String createStartTag()
{
StringBuffer out = new StringBuffer();
out.append(getStartTagChar());
if(getBeginStartModifierDefined())
{
out.append(getBeginStartModifier());
}
out.append(getElementType());
Enumeration<String> en = getEleme... | out.append(alterCase(attr));
if(!value.equalsIgnoreCase(NO_ATTRIBUTE_VALUE) && getAttributeQuote())
{
out.append(getAttributeEqualitySign());
out.append(getAttributeQuoteChar());
out.append(value);
out.append(getAttributeQuoteChar()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\ElementAttributes.java | 1 |
请完成以下Java代码 | public static Instant fromObjectToInstant(final Object valueObj)
{
return fromObjectTo(valueObj,
Instant.class,
de.metas.util.converter.DateTimeConverters::fromJsonToInstant,
TimeUtil::asInstant);
}
@Nullable
private static <T> T fromObjectTo(
final Object valueObj,
@NonNull final Clas... | }
catch (final Exception e)
{
logger.warn("Error while converting possible JDBC Timestamp `{}` to java.sql.Timestamp", json, e);
return fromJsonConverer.apply(json);
}
}
else
{
return fromJsonConverer.apply(json);
}
}
else if (valueObj instanceof StringLookupValue)
{
final... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\DateTimeConverters.java | 1 |
请完成以下Java代码 | public void setHeightInCm (int HeightInCm)
{
set_Value (COLUMNNAME_HeightInCm, Integer.valueOf(HeightInCm));
}
/** Get Height In Cm.
@return Height In Cm */
@Override
public int getHeightInCm ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_HeightInCm);
if (ii == null)
return 0;
return ii.intValu... | /** Set Package Content.
@param PackageContent Package Content */
@Override
public void setPackageContent (java.lang.String PackageContent)
{
set_Value (COLUMNNAME_PackageContent, PackageContent);
}
/** Get Package Content.
@return Package Content */
@Override
public java.lang.String getPackageContent... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-gen\de\metas\shipper\gateway\dpd\model\X_DPD_StoreOrderLine.java | 1 |
请完成以下Java代码 | public DmnDecisionLogicEvaluationEvent getDecisionResult() {
return decisionResult;
}
public void setDecisionResult(DmnDecisionLogicEvaluationEvent decisionResult) {
this.decisionResult = decisionResult;
}
@Override
public Collection<DmnDecisionLogicEvaluationEvent> getRequiredDecisionResults() {
... | @Override
public String toString() {
DmnDecision dmnDecision = decisionResult.getDecision();
return "DmnDecisionEvaluationEventImpl{" +
" key="+ dmnDecision.getKey() +
", name="+ dmnDecision.getName() +
", decisionLogic=" + dmnDecision.getDecisionLogic() +
", requiredDecisionResults=" ... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\delegate\DmnDecisionEvaluationEventImpl.java | 1 |
请完成以下Java代码 | public int getProductId()
{
return productDescriptor.getProductId();
}
@Value
public static class StockChangeDetails
{
ResetStockPInstanceId resetStockPInstanceId;
int transactionId;
int stockId;
@JsonCreator
@Builder
public StockChangeDetails(
@JsonProperty("resetStockPInstanceId") final Reset... | this.transactionId = transactionId;
this.stockId = stockId;
}
}
@Nullable
@Override
public TableRecordReference getSourceTableReference()
{
return TableRecordReference.ofNullable(I_M_Transaction.Table_Name, stockChangeDetails.getTransactionId());
}
@Override
public String getEventName() {return TYPE;}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\stock\StockChangedEvent.java | 1 |
请完成以下Java代码 | public POSPaymentProcessResponse process(@NonNull final POSPaymentProcessRequest request)
{
try
{
final SumUpConfig sumUpConfig = getSumUpConfig(request.getPaymentProcessorConfig());
final SumUpTransaction sumUpTrx = sumUpService.cardReaderCheckout(
SumUpCardReaderCheckoutRequest.builder()
.conf... | {
Check.assumeEquals(paymentProcessorConfig.getType(), POSPaymentProcessorType.SumUp, "payment processor type is SumUp: {}", paymentProcessorConfig);
final SumUpConfigId sumUpConfigId = Check.assumeNotNull(paymentProcessorConfig.getSumUpConfigId(), "sumUpConfigId is set for {}", paymentProcessorConfig);
return s... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\payment_gateway\sumup\SumUpPaymentProcessor.java | 1 |
请完成以下Java代码 | private void copyQuotationLineToSalesOrder(final I_C_Order newOrder, final I_C_OrderLine fromQuotationLine)
{
final I_C_OrderLine salesOrderLine = InterfaceWrapperHelper.copy()
.setFrom(fromQuotationLine)
.setSkipCalculatedColumns(true)
.copyToNew(I_C_OrderLine.class);
salesOrderLine.setC_Order_ID(new... | private final String quotationGroupName;
@NonNull
final OrgId orgId;
@NonNull
final ProductId quotationTemplateProductId;
@NonNull
final BigDecimal price;
@NonNull
final BigDecimal qty;
@NonNull
final UomId uomId;
@NonNull
final TaxCategoryId taxCategoryId;
//
// Additional quotation lines ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\createFrom\CreateSalesOrderAndBOMsFromQuotationCommand.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class SecurityContextConfigurer<H extends HttpSecurityBuilder<H>>
extends AbstractHttpConfigurer<SecurityContextConfigurer<H>, H> {
private boolean requireExplicitSave = true;
/**
* Creates a new instance
* @see HttpSecurity#securityContext(Customizer)
*/
public SecurityContextConfigurer() {
... | @Override
@SuppressWarnings("unchecked")
public void configure(H http) {
SecurityContextRepository securityContextRepository = getSecurityContextRepository();
if (this.requireExplicitSave) {
SecurityContextHolderFilter securityContextHolderFilter = postProcess(
new SecurityContextHolderFilter(securityCont... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\SecurityContextConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
if (obj == null)
{
return false;
}
if (getClass() != obj.getClass())
{
return false;
}
final Cctop000V other = (Cctop000V)obj;
if (cbPartnerLocationID == null)
{
if (other.cbPartnerLocationID != null)
{
... | else if (!isTest.equals(other.isTest))
{
return false;
}
if (senderGln == null)
{
if (other.senderGln != null)
{
return false;
}
}
else if (!senderGln.equals(other.senderGln))
{
return false;
}
return true;
}
@Override
public String toString()
{
return "Cctop000V [cbPartnerLo... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\invoicexport\compudata\Cctop000V.java | 2 |
请完成以下Java代码 | public class HUVendorBPartnerAttributeHandler
implements IAttributeValueGeneratorAdapter, IAttributeValueCalloutAdapter, IAttributeValuesProviderFactory
{
private final IHUAttributesBL ihuAttributesBL = Services.get(IHUAttributesBL.class);
@Override
public String getAttributeValueType()
{
return HUVendorBPart... | }
@Override
public boolean isReadonlyUI(final IAttributeValueContext ctx, final IAttributeSet attributeSet, final org.compiere.model.I_M_Attribute attribute)
{
final I_M_HU hu = ihuAttributesBL.getM_HU_OrNull(attributeSet);
if (hu == null)
{
// If there is no HU (e.g. ASI), consider it editable
return f... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\org\adempiere\mm\attributes\spi\impl\HUVendorBPartnerAttributeHandler.java | 1 |
请完成以下Java代码 | public String toPS()
{
final StringBuilder sb = new StringBuilder("/");
sb.append(getFont().getPSName());
if (getFont().isBold())
sb.append(" Bold");
if (getFont().isItalic())
sb.append(" Italic");
sb.append(" ").append(getFont().getSize())
.append(" selectfont");
return sb.toString();
} // toPS
... | * Get Font
* @param AD_PrintFont_ID id
* @return Font
*/
static public MPrintFont get (final int AD_PrintFont_ID)
{
final MPrintFont printFont = s_fonts.get(AD_PrintFont_ID, new Callable<MPrintFont>()
{
@Override
public MPrintFont call() throws Exception
{
return new MPrintFont (Env.getCtx()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\MPrintFont.java | 1 |
请完成以下Java代码 | public List<CellValue> getHeaderNames()
{
final ArrayList<CellValue> result = new ArrayList<>();
for (int i = 0; i < getColumnCount(); i++)
{
result.add(CellValues.toCellValue(getHeaderName(i)));
}
return result;
}
private String getHeaderName(final int col)
{
return m_tab.getField(col).getHeader();... | private MLookup getButtonLookup(final GridField mField)
{
MLookup lookup = m_buttonLookups.get(mField.getColumnName());
if (lookup != null)
{
return lookup;
}
// TODO: refactor with org.compiere.grid.ed.VButton.setField(GridField)
if (mField.getColumnName().endsWith("_ID") && !IColumnBL.isRecordIdColum... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\impexp\spreadsheet\excel\GridTabExcelExporter.java | 1 |
请完成以下Java代码 | private IAttributeValue createAttributeValue(
final I_M_AttributeInstance attributeInstance,
final I_M_HU_PI_Attribute piAttribute,
final boolean isGeneratedAttribute)
{
return new AIWithHUPIAttributeValue(this, attributeInstance, piAttribute, isGeneratedAttribute);
}
@Override
protected List<IAttribute... | public void saveChangesIfNeeded()
{
throw new UnsupportedOperationException();
}
@Override
public void setSaveOnChange(boolean saveOnChange)
{
throw new UnsupportedOperationException();
}
@Override
public UOMType getQtyUOMTypeOrNull()
{
// ASI attribute storages does not support Qty Storage
return nu... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\ASIWithPackingItemTemplateAttributeStorage.java | 1 |
请完成以下Java代码 | private static class NewImageView extends ImageView {
Element elem;
public NewImageView(Element elem) {
super(elem);
this.elem=elem;
}
public Image getImage() {
//return smile image
//java.awt.Toolkit.getDefaultToolkit().getImage(getImageURL()).flush();
//if (smileImage == null) {
S... | getAttribute(HTML.Attribute.SRC);
//System.out.println("img load: " + src.substring(4));
URL url = getClass().getClassLoader().
getResource(src.substring(4));
if (url != null) {
// System.out.println("load image: " + url);
return url;
}
}
return null;
}
private static ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\apps\graph\FCHtmlEditorKit.java | 1 |
请完成以下Java代码 | public boolean isSelectionActive() {
return m_selectionActive;
}
public void setSelectionActive(boolean active) {
m_selectionActive = active;
}
public ArrayList<Integer> getSelection() {
return selection;
}
public void setSelection(ArrayList<Integer> selection) {
this.selection = selection;
}
public... | }
public void setReportEngineType(int reportEngineType) {
this.reportEngineType = reportEngineType;
}
public MPrintFormat getPrintFormat() {
return this.printFormat;
}
public void setPrintFormat(MPrintFormat printFormat) {
this.printFormat = printFormat;
}
public String getAskPrintMsg() {
return as... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\GenForm.java | 1 |
请完成以下Java代码 | public I_MSV3_Substitution storeSubstitutionOrNull(@Nullable final OrderResponsePackageItemSubstitution itemSubstitution)
{
if (itemSubstitution == null)
{
return null;
}
final I_MSV3_Substitution substitutionRecord = newInstance(I_MSV3_Substitution.class);
substitutionRecord.setAD_Org_ID(orgId.getRepoId... | if (substitution == null)
{
return null;
}
final I_MSV3_Substitution substitutionRecord = newInstance(I_MSV3_Substitution.class);
substitutionRecord.setMSV3_Grund(substitution.getReason().value());
substitutionRecord.setMSV3_LieferPzn(substitution.getPzn().getValueAsString());
substitutionRecord.setMSV3... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\common\Msv3SubstitutionDataPersister.java | 1 |
请完成以下Java代码 | public boolean isExpanded() {
return isExpandedAttribute.getValue(this);
}
public void setExpanded(boolean isExpanded) {
isExpandedAttribute.setValue(this, isExpanded);
}
public boolean isMarkerVisible() {
return isMarkerVisibleAttribute.getValue(this);
}
public void setMarkerVisible(boolean ... | }
public BpmnShape getChoreographyActivityShape() {
return choreographyActivityShapeAttribute.getReferenceTargetElement(this);
}
public void setChoreographyActivityShape(BpmnShape choreographyActivityShape) {
choreographyActivityShapeAttribute.setReferenceTargetElement(this, choreographyActivityShape);
... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnShapeImpl.java | 1 |
请完成以下Java代码 | public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
@Override
public void setProcessing (final boolean Processing)
{
set_Value (COLUMNNAME_Processing, Processing)... | @Override
public int getTermOfNotice()
{
return get_ValueAsInt(COLUMNNAME_TermOfNotice);
}
/**
* TermOfNoticeUnit AD_Reference_ID=540281
* Reference name: TermDurationUnit
*/
public static final int TERMOFNOTICEUNIT_AD_Reference_ID=540281;
/** Monat(e) = month */
public static final String TERMOFNOTIC... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_Transition.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.