instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void setQty_Planned (final @Nullable BigDecimal Qty_Planned)
{
set_Value (COLUMNNAME_Qty_Planned, Qty_Planned);
}
@Override
public BigDecimal getQty_Planned()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty_Planned);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void ... | * Type AD_Reference_ID=540263
* Reference name: C_Flatrate_DataEntry Type
*/
public static final int TYPE_AD_Reference_ID=540263;
/** Invoicing_PeriodBased = IP */
public static final String TYPE_Invoicing_PeriodBased = "IP";
/** Correction_PeriodBased = CP */
public static final String TYPE_Correction_PeriodB... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_DataEntry.java | 1 |
请完成以下Java代码 | public void setIncidentIds(String[] incidentIds) {
this.incidentIds = incidentIds;
}
@Override
public Incident[] getIncidents() {
return incidents;
}
public void setIncidents(Incident[] incidents) {
this.incidents = incidents;
}
public void setSubProcessInstanceId(String subProcessInstanceI... | return this.getClass().getSimpleName()
+ "[executionId=" + executionId
+ ", targetActivityId=" + activityId
+ ", activityName=" + activityName
+ ", activityType=" + activityType
+ ", id=" + id
+ ", parentActivityInstanceId=" + parentActivityInstanceId
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TransitionInstanceImpl.java | 1 |
请完成以下Java代码 | public class PlainEventBusFactory implements IEventBusFactory
{
public static PlainEventBusFactory newInstance()
{
return new PlainEventBusFactory();
}
private final HashMap<Topic, EventBus> eventBuses = new HashMap<>();
public PlainEventBusFactory()
{
assertJUnitTestMode();
}
private static void assertJ... | public void initEventBussesWithGlobalListeners()
{
assertJUnitTestMode();
// as of now, no unit test needs an implementation.
}
@Override
public void destroyAllEventBusses()
{
assertJUnitTestMode();
// as of now, no unit test needs an implementation.
}
@Override
public void registerGlobalEventListener... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\impl\PlainEventBusFactory.java | 1 |
请完成以下Java代码 | public class Dispatcher {
private final AccessManager accessManager;
private final List<HandlerMapper> mappers;
public Dispatcher(AccessManager accessManager, Collection<HandlerMapper> mappers) {
Assert.notNull(accessManager, "'accessManager' must not be null");
Assert.notNull(mappers, "'mappers' must not be ... | handle(handler, request, response);
return true;
}
}
return false;
}
private void handle(Handler handler, ServerHttpRequest request, ServerHttpResponse response) throws IOException {
if (!this.accessManager.isAllowed(request)) {
response.setStatusCode(HttpStatus.FORBIDDEN);
return;
}
handler.h... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\remote\server\Dispatcher.java | 1 |
请完成以下Java代码 | public java.lang.String getDocumentNo()
{
return get_ValueAsString(COLUMNNAME_DocumentNo);
}
@Override
public void setHelp (final @Nullable java.lang.String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
@Override
public java.lang.String getHelp()
{
return get_ValueAsString(COLUMNNAME_Help);
}
@Over... | {
set_Value (COLUMNNAME_IsReport, IsReport);
}
@Override
public boolean isReport()
{
return get_ValueAsBoolean(COLUMNNAME_IsReport);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_Valu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Archive.java | 1 |
请完成以下Java代码 | public class PmsProductFullReduction implements Serializable {
private Long id;
private Long productId;
private BigDecimal fullPrice;
private BigDecimal reducePrice;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long i... | return reducePrice;
}
public void setReducePrice(BigDecimal reducePrice) {
this.reducePrice = reducePrice;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash ... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductFullReduction.java | 1 |
请完成以下Java代码 | public IntegrationFlow fileWriter() {
return IntegrationFlow.from("holdingTank")
.bridge(e -> e.poller(Pollers.fixedRate(Duration.of(1, TimeUnit.SECONDS.toChronoUnit()), Duration.of(20, TimeUnit.SECONDS.toChronoUnit()))))
.handle(targetDirectory())
.get();
}
// @Bean... | final AbstractApplicationContext context = new AnnotationConfigApplicationContext(JavaDSLFileCopyConfig.class);
context.registerShutdownHook();
final Scanner scanner = new Scanner(System.in);
System.out.print("Please enter a string and press <enter>: ");
while (true) {
final ... | repos\tutorials-master\spring-integration\src\main\java\com\baeldung\dsl\JavaDSLFileCopyConfig.java | 1 |
请完成以下Java代码 | public String getCaseInstanceId() {
return caseInstanceId;
}
public void setCaseInstanceId(String caseInstanceId) {
this.caseInstanceId = caseInstanceId;
}
public String getCaseDefinitionId() {
return caseDefinitionId;
}
public void setCaseDefinitionId(String caseDefin... | }
public void addContinueParentPlanItemInstance(String planItemInstanceId, PlanItemInstanceEntity continueParentPlanItemInstance) {
continueParentPlanItemInstanceMap.put(planItemInstanceId, continueParentPlanItemInstance);
}
public PlanItemInstanceEntity getContinueParentPlanItemInstance(S... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\MovePlanItemInstanceEntityContainer.java | 1 |
请完成以下Java代码 | public abstract class AbstractDunnableSource implements IDunnableSource
{
protected final transient Logger logger = LogManager.getLogger(getClass());
protected abstract Iterator<IDunnableDoc> createRawSourceIterator(IDunningContext context);
@Override
public final Iterator<IDunnableDoc> iterator(final IDunningCon... | {
if (level.isShowAllDue())
{
// Document is due, and we are asked to show all due, so there is no point to check if the days after due is valid
return true;
}
}
else
{
// Document is not due yet => not eligible for dunning
return false;
}
final int daysAfterDue = level.getDaysAfterDue... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\spi\impl\AbstractDunnableSource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AssetImportService extends BaseEntityImportService<AssetId, Asset, EntityExportData<Asset>> {
private final AssetService assetService;
@Override
protected void setOwner(TenantId tenantId, Asset asset, IdProvider idProvider) {
asset.setTenantId(tenantId);
asset.setCustomerId(id... | protected Asset deepCopy(Asset asset) {
return new Asset(asset);
}
@Override
protected void cleanupForComparison(Asset e) {
super.cleanupForComparison(e);
if (e.getCustomerId() != null && e.getCustomerId().isNullUid()) {
e.setCustomerId(null);
}
}
@Overr... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\AssetImportService.java | 2 |
请完成以下Java代码 | final class DDOrderLineToAllocate
{
@NonNull private final IUOMConversionBL uomConversionBL;
@NonNull private final DDOrderId ddOrderId;
@NonNull private final DDOrderLineId ddOrderLineId;
private final int ddOrderLineAlternativeId;
@Getter
@Nullable private final String description;
private final ArrayList<P... | public DDOrderLineId getDDOrderLineId() {return ddOrderLineId;}
public int getDDOrderLineAlternativeId() {return ddOrderLineAlternativeId;}
public ImmutableList<PickFromHU> getPickFromHUs() {return ImmutableList.copyOf(pickFromHUs);}
public boolean isFullyShipped()
{
return qtyToShipRemaining.signum() <= 0;
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\generate_from_hu\DDOrderLineToAllocate.java | 1 |
请完成以下Java代码 | public void hit(int begin, int end, CoreDictionary.Attribute value)
{
int length = end - begin;
if (length > wordNet[begin])
{
wordNet[begin] = length;
if (config.speechTagging)
{
... | public AhoCorasickDoubleArrayTrieSegment loadDictionary(String... pathArray)
{
trie = new AhoCorasickDoubleArrayTrie<CoreDictionary.Attribute>();
TreeMap<String, CoreDictionary.Attribute> map = null;
try
{
map = IOUtil.loadDictionary(pathArray);
}
catch (I... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\Other\AhoCorasickDoubleArrayTrieSegment.java | 1 |
请完成以下Java代码 | public XhtmlFrameSetDocument appendTitle(String value)
{
title.addElement(value);
return(this);
}
/**
* Sets the codeset for this XhtmlFrameSetDocument
*/
public void setCodeset ( String codeset )
{
this.codeset = codeset;
}
/**
* Gets ... | html.output(out);
}
/**
Override the toString() method so that it prints something meaningful.
*/
public final String toString()
{
if ( getCodeset() != null )
return (html.toString(getCodeset()));
else
return(html.toString());
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\XhtmlFrameSetDocument.java | 1 |
请完成以下Java代码 | public int getM_AttributeSetInstance_ID()
{
return get_ValueAsInt(COLUMNNAME_M_AttributeSetInstance_ID);
}
@Override
public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@... | set_Value (COLUMNNAME_Price_UOM_ID, null);
else
set_Value (COLUMNNAME_Price_UOM_ID, Price_UOM_ID);
}
@Override
public int getPrice_UOM_ID()
{
return get_ValueAsInt(COLUMNNAME_Price_UOM_ID);
}
@Override
public void setQty (final @Nullable BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Detail.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/oauth_login", "/loginFailure", "/")
.permitAll()
.anyRequest()
.authenticated()
.and()
... | .map(c -> getRegistration(c))
.filter(registration -> registration != null)
.collect(Collectors.toList());
return new InMemoryClientRegistrationRepository(registrations);
}
// @Bean
public OAuth2AuthorizedClientService authorizedClientService() {
return new InMemoryO... | repos\tutorials-master\spring-security-modules\spring-security-oauth2\src\main\java\com\baeldung\oauth2\SecurityConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int delete(List<T> list) {
if (list.isEmpty() || list.size() <= 0) {
return 0;
} else {
return (int) sessionTemplate.delete(getStatement(SQL_BATCH_DELETE_BY_IDS), list);
}
}
/**
* 根据column批量删除数据.
*/
public int delete(Map<String, Object> paramMap) {
if (paramMap == null) {
return 0;
} e... | // 根据页面传来的分页参数构造SQL分页参数
paramMap.put("pageFirst", (pageParam.getPageNum() - 1) * pageParam.getNumPerPage());
paramMap.put("pageSize", pageParam.getNumPerPage());
paramMap.put("startRowNum", (pageParam.getPageNum() - 1) * pageParam.getNumPerPage());
paramMap.put("endRowNum", pageParam.getPageNum() * pageParam.ge... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\dao\impl\PermissionBaseDaoImpl.java | 2 |
请完成以下Java代码 | private void validateBillPartner(
@NonNull final I_C_Flatrate_Term callOrderContract,
@NonNull final BPartnerId documentBillPartnerId,
final int documentLineSeqNo)
{
final BPartnerId contractBillPartnerId = BPartnerId.ofRepoId(callOrderContract.getBill_BPartner_ID());
if (!contractBillPartnerId.equals(do... | {
return;
}
if (initiatingContractOrder.isSOTrx())
{
throw new AdempiereException(MSG_SALES_CALL_ORDER_CONTRACT_TRX_NOT_MATCH,
contract.getDocumentNo(),
documentLineSeqNo)
.markAsUserValidationError();
}
throw new AdempiereException(MSG_PURCHASE_CALL_ORDER_CONTRACT_TRX_NOT_M... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\callorder\CallOrderContractService.java | 1 |
请完成以下Java代码 | public String getDataState() {
return dataState;
}
public void setDataState(String dataState) {
this.dataState = dataState;
}
public String getItemSubjectRef() {
return itemSubjectRef;
}
public void setItemSubjectRef(String itemSubjectRef) {
this.itemSubjectRef... | }
public DataStoreReference clone() {
DataStoreReference clone = new DataStoreReference();
clone.setValues(this);
return clone;
}
public void setValues(DataStoreReference otherElement) {
super.setValues(otherElement);
setDataState(otherElement.getDataState());
... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\DataStoreReference.java | 1 |
请完成以下Java代码 | public CustomPropertiesResolver createClassDelegateCustomPropertiesResolver(ActivitiListener activitiListener) {
return classDelegateFactory.create(activitiListener.getCustomPropertiesResolverImplementation(), null);
}
@Override
public CustomPropertiesResolver createExpressionCustomPropertiesResolv... | * the name of the entity
* @return
* @throws ActivitiIllegalArgumentException
* when the given entity name
*/
protected Class<?> getEntityType(String entityType) {
if (entityType != null) {
Class<?> entityClass = ENTITY_MAPPING.get(entityType.trim());
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\factory\DefaultListenerFactory.java | 1 |
请完成以下Java代码 | public void setDK_ParcelWidth (java.math.BigDecimal DK_ParcelWidth)
{
set_Value (COLUMNNAME_DK_ParcelWidth, DK_ParcelWidth);
}
/** Get Paketbreite.
@return Paketbreite */
@Override
public java.math.BigDecimal getDK_ParcelWidth ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DK_ParcelWidth);
if (... | {
return (java.lang.String)get_Value(COLUMNNAME_DK_Reference);
}
/** Set Zeile Nr..
@param Line
Einzelne Zeile in dem Dokument
*/
@Override
public void setLine (int Line)
{
set_Value (COLUMNNAME_Line, Integer.valueOf(Line));
}
/** Get Zeile Nr..
@return Einzelne Zeile in dem Dokument
*/
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java-gen\de\metas\shipper\gateway\derkurier\model\X_DerKurier_DeliveryOrderLine.java | 1 |
请完成以下Java代码 | @NonNull Set<String> commaDelimitedStringToSet(@Nullable String commaDelimitedString) {
return StringUtils.hasText(commaDelimitedString)
? Arrays.stream(commaDelimitedString.split(","))
.map(String::trim)
.filter(StringUtils::hasText)
.collect(Collectors.toSet())
: Collections.emptySet();
}
@Non... | if (isNotDefaultProfileOnlySet(defaultProfiles)) {
resolvedProfiles = defaultProfiles;
}
}
return resolvedProfiles;
}
// The Set of configured Profiles cannot be null, empty or contain only the "default" Profile.
boolean isNotDefaultProfileOnlySet(@Nullable Set<String> profiles) {
return Objects.nonN... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\data\AbstractCacheDataImporterExporter.java | 1 |
请完成以下Java代码 | public void setSkipExpression(String skipExpression) {
this.skipExpression = skipExpression;
}
public boolean isAutoStoreVariables() {
return autoStoreVariables;
}
public void setAutoStoreVariables(boolean autoStoreVariables) {
this.autoStoreVariables = autoStoreVariables;
... | @Override
public ScriptTask clone() {
ScriptTask clone = new ScriptTask();
clone.setValues(this);
return clone;
}
public void setValues(ScriptTask otherElement) {
super.setValues(otherElement);
setScriptFormat(otherElement.getScriptFormat());
setScript(otherE... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\ScriptTask.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SysUserPositionServiceImpl extends ServiceImpl<SysUserPositionMapper, SysUserPosition> implements ISysUserPositionService {
@Autowired
private SysUserPositionMapper sysUserPositionMapper;
@Autowired
private SysUserMapper userMapper;
@Override
public IPage<SysUser> getPositionUser... | throw new JeecgBootException(realnames + "已存在该职位中");
}
}
@Override
public void removeByPositionId(String positionId) {
sysUserPositionMapper.removeByPositionId(positionId);
}
@Override
public void removePositionUser(String userIds, String positionId) {
String[] userIdAr... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysUserPositionServiceImpl.java | 2 |
请完成以下Java代码 | public Builder withResetButton(final boolean withResetButton)
{
this.withResetButton = withResetButton;
return this;
}
public Builder withCustomizeButton(final boolean withCustomizeButton)
{
this.withCustomizeButton = withCustomizeButton;
return this;
}
public Builder withHistoryButton(final b... | }
/**
* Advice builder to create the buttons without any text on them.
*
* NOTE: this is the default option anyway. You can call it just to explicitly state the obvious.
*/
public Builder withoutText()
{
return withText(false);
}
/**
* Advice builder to create the buttons with or without ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ConfirmPanel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class FTSConfigId implements RepoIdAware
{
@JsonCreator
public static FTSConfigId ofRepoId(final int repoId)
{
return new FTSConfigId(repoId);
}
@Nullable
public static FTSConfigId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new FTSConfigId(repoId) : null;
}
int repoId; | private FTSConfigId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "ES_FTS_Config_ID");
}
@JsonValue
@Override
public int getRepoId()
{
return repoId;
}
public static int toRepoId(@Nullable final FTSConfigId id)
{
return id != null ? id.getRepoId() : -1;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSConfigId.java | 2 |
请完成以下Java代码 | protected Entry<String, List<Double>> createOutputDoubleValues(Collection<Map<String, Object>> ruleResults) {
Map<String, List<Double>> distinctOutputDoubleValues = new HashMap<>();
for (Map<String, Object> ruleResult : ruleResults) {
for (Entry<String, Object> entry : ruleResult.entrySet()... | protected Double aggregateMin(List<Double> values) {
return Collections.min(values);
}
protected Double aggregateMax(List<Double> values) {
return Collections.max(values);
}
protected Double aggregateCount(List<Double> values) {
return (double) values.size();
}
protect... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\hitpolicy\HitPolicyCollect.java | 1 |
请完成以下Java代码 | public Builder method(String method) {
this.method = method;
return this;
}
/**
* Sets the value of the HTTP target URI of the request to which the DPoP Proof
* {@link Jwt} is attached, without query and fragment parts.
* @param targetUri the value of the HTTP target URI of the request to which the
... | validate();
return new DPoPProofContext(this.dPoPProof, this.method, this.targetUri, this.accessToken);
}
private void validate() {
Assert.hasText(this.method, "method cannot be empty");
Assert.hasText(this.targetUri, "targetUri cannot be empty");
if (!"GET".equals(this.method) && !"HEAD".equals(this.m... | repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\DPoPProofContext.java | 1 |
请完成以下Java代码 | final class MaturingConfigMap
{
private final ImmutableMap<MaturingConfigLineId, MaturingConfigLine> byId;
private final ImmutableListMultimap<ProductId, MaturingConfigLine> byMaturedProductId;
private final ImmutableListMultimap<ProductId, MaturingConfigLine> byFromProductId;
public MaturingConfigMap(@NonNull fin... | {
final MaturingConfigLine line = byId.get(id);
if (line == null)
{
throw new AdempiereException("@NotFound@ @M_MaturingConfig_Line_ID@: " + id);
}
return line;
}
public List<MaturingConfigLine> getByMaturedProductId(@NonNull final ProductId maturedProductId)
{
return byMaturedProductId.get(maturedPr... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\material\maturing\MaturingConfigMap.java | 1 |
请完成以下Spring Boot application配置 | spring.security.user.name=baeldung
# Encoded password with SpringBoot CLI, the decoded password is baeldungPassword
spring.security.user.password={bc | rypt}$2y$10$R8VIwFiQ7aUST17YqMaWJuxjkCYqk3jjPlSxyDLLzqCTOwFuJNq2a | repos\tutorials-master\spring-boot-modules\spring-boot-cli\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setUrl(String url) {
this.url = url;
}
@ApiModelProperty(value = "For a single resource contains the actual URL to use for retrieving the binary resource", example = "http://localhost:8081/flowable-rest/service/cmmn-repository/deployments/10/resources/diagrams%2Fmy-process.bpmn20.xml")
... | }
@ApiModelProperty(example = "text/xml", value = "Contains the media-type the resource has. This is resolved using a (pluggable) MediaTypeResolver and contains, by default, a limited number of mime-type mappings.")
public String getMediaType() {
return mediaType;
}
public void setType(String ... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\DeploymentResourceResponse.java | 2 |
请完成以下Java代码 | public void setFieldNurseIdentifier(@Nullable final String fieldNurseIdentifier)
{
this.fieldNurseIdentifier = fieldNurseIdentifier;
this.fieldNurseIdentifierSet = true;
}
public void setDeactivationReason(@Nullable final String deactivationReason)
{
this.deactivationReason = deactivationReason;
this.deact... | }
public void setCreatedByIdentifier(@Nullable final String createdByIdentifier)
{
this.createdByIdentifier = createdByIdentifier;
this.createdByIdentifierSet = true;
}
public void setUpdatedAt(@Nullable final Instant updatedAt)
{
this.updatedAt = updatedAt;
this.updatedAtSet = true;
}
public void set... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\alberta\JsonAlbertaPatient.java | 1 |
请完成以下Java代码 | protected boolean hasExcludingConditions() {
return super.hasExcludingConditions() || CompareUtil.elementIsNotContainedInArray(variableName, variableNames);
}
// results ////////////////////////////////////////////////////
@Override
public long executeCount(CommandContext commandContext) {
checkQueryO... | public String getVariableName() {
return variableName;
}
public String[] getVariableNames() {
return variableNames;
}
public String getVariableNameLike() {
return variableNameLike;
}
public String[] getExecutionIds() {
return executionIds;
}
public String[] getProcessInstanceIds() {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\VariableInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public class User implements Serializable {
private static final long serialVersionUID = 3317686311392412458L;
private String username;
private String password;
private String role;
private String email;
public User(String username, String password, String role) {
this.username = usern... | public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
retur... | repos\tutorials-master\spring-boot-modules\spring-boot-springdoc\src\main\java\com\baeldung\jwt\User.java | 1 |
请完成以下Java代码 | private static void startAddon(final String className)
{
try
{
final Class<?> clazz = Class.forName(className);
final Class<? extends IAddOn> clazzVC = clazz
.asSubclass(IAddOn.class);
final IAddOn instance = clazzVC.newInstance();
instance.beforeConnection();
}
catch (ClassNotFoundExceptio... | catch (ClassCastException e)
{
MetasfreshLastError.saveError(logger, "Addon class " + className + " doesn't implement " + IAddOn.class.getName(), e);
}
catch (InstantiationException e)
{
throw new RuntimeException(e);
}
catch (IllegalAccessException e)
{
throw new RuntimeException(e);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\addon\impl\AddonStarter.java | 1 |
请完成以下Java代码 | public class CustomRecursiveAction extends RecursiveAction {
final Logger logger = LoggerFactory.getLogger(CustomRecursiveAction.class);
private String workLoad = "";
private static final int THRESHOLD = 4;
public CustomRecursiveAction(String workLoad) {
this.workLoad = workLoad;
}
@... | List<CustomRecursiveAction> subtasks = new ArrayList<>();
String partOne = workLoad.substring(0, workLoad.length() / 2);
String partTwo = workLoad.substring(workLoad.length() / 2, workLoad.length());
subtasks.add(new CustomRecursiveAction(partOne));
subtasks.add(new CustomRecursiveActi... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced\src\main\java\com\baeldung\forkjoin\CustomRecursiveAction.java | 1 |
请完成以下Java代码 | public boolean executeScript(String sql, String fileName) {
BufferedReader reader = new BufferedReader(new StringReader(sql));
StringBuffer sqlBuf = new StringBuffer();
String line;
boolean statementReady = false;
boolean execOk = true;
boolean longComment = false;
try {
while ((line = reader.readLine(... | } catch (SQLException e) {
e.printStackTrace();
execOk = false;
log.error("Script: " + fileName + " - " + e.getMessage() + ". The line that caused the error is the following ==> " + sqlBuf, e);
} finally {
stmt.close();
if(execOk)
conn.commit();
else
conn.rollback(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\process\ApplyMigrationScripts.java | 1 |
请完成以下Java代码 | public OrderStatusResponse getOrderStatus(@NonNull final Id orderId, @NonNull final BPartnerId bpartnerId)
{
final JpaOrder jpaOrder = getJpaOrder(orderId, bpartnerId);
return createOrderStatusResponse(jpaOrder);
}
private JpaOrder getJpaOrder(@NonNull final Id orderId, @NonNull final BPartnerId bpartnerId)
{
... | return OrderStatusResponse.builder()
.orderId(Id.of(jpaOrder.getDocumentNo()))
.supportId(SupportIDType.of(jpaOrder.getSupportId()))
.orderStatus(jpaOrder.getOrderStatus())
.orderPackages(jpaOrder.getOrderPackages().stream()
.map(this::createOrderResponsePackage)
.collect(ImmutableList.toImm... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\order\OrderService.java | 1 |
请完成以下Java代码 | public static void fillJsonTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap) {
convertersToBpmnMap.put(STENCIL_TASK_DECISION, DecisionTaskJsonConverter.class);
}
public static void fillBpmnTypes(
Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverte... | }
}
return serviceTask;
}
@Override
protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) {}
@Override
public void setDecisionTableMap(Map<String, String> decisionTableMap) {
this.decisionTableMap = decisionTableMap;
}
protected v... | repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\DecisionTaskJsonConverter.java | 1 |
请完成以下Java代码 | public class CommandInvoker extends AbstractCommandInterceptor {
private static final Logger logger = LoggerFactory.getLogger(CommandInvoker.class);
@Override
@SuppressWarnings("unchecked")
public <T> T execute(final CommandConfig config, final Command<T> command) {
final CommandContext comman... | if (runnable instanceof AbstractOperation) {
AbstractOperation operation = (AbstractOperation) runnable;
// Execute the operation if the operation has no execution (i.e. it's an operation not working on a process instance)
// or the operation has an execution and it is not ended
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\interceptor\CommandInvoker.java | 1 |
请完成以下Java代码 | public class Application {
private static final Logger LOG = LoggerFactory.getLogger(Application.class);
public static void main(String[] args) {
new Application().run();
}
public void run() {
CassandraConnector connector = new CassandraConnector();
connector.connect("127.0.0... | productRepository.insertProductVariantBatch(productV1, productV2);
List<Product> products = productRepository.selectAllProduct("testKeyspace");
products.forEach(x -> LOG.info(x.toString()));
connector.close();
}
private Product getProduct() {
Product product = ne... | repos\tutorials-master\persistence-modules\java-cassandra\src\main\java\com\baeldung\cassandra\batch\Application.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public at.erpel.schemas._1p0.documents.extensions.edifact.CustomerExtensionType getCustomerExtension() {
return customerExtension;
}
/**
* Sets the value of the customerExtension property.
*
* @param value
* allowed object is
* {@link at.erpel.schemas._1p0.documents.ex... | return erpelCustomerExtension;
}
/**
* Sets the value of the erpelCustomerExtension property.
*
* @param value
* allowed object is
* {@link CustomType }
*
*/
public void setErpelCustomerExtension(CustomType value) {
this.erpelCustomerExtension = valu... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\CustomerExtensionType.java | 2 |
请完成以下Java代码 | public Optional<V> get(K key) {
this.lock.readLock().lock();
try {
LinkedListNode<CacheElement<K, V>> linkedListNode = this.linkedListNodeMap.get(key);
if (linkedListNode != null && !linkedListNode.isEmpty()) {
linkedListNodeMap.put(key, this.doublyLinkedList.move... | } finally {
this.lock.writeLock().unlock();
}
}
private boolean evictElement() {
this.lock.writeLock().lock();
try {
LinkedListNode<CacheElement<K, V>> linkedListNode = doublyLinkedList.removeTail();
if (linkedListNode.isEmpty()) {
re... | repos\tutorials-master\data-structures\src\main\java\com\baeldung\lrucache\LRUCache.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BPartnerId
{
public static BPartnerId of(final int bpartnerId, final int bpartnerLocationId)
{
return new BPartnerId(bpartnerId, bpartnerLocationId);
}
public static BPartnerId of(final int bpartnerId)
{
final int bpartnerLocationId = -1;
return new BPartnerId(bpartnerId, bpartnerLocationId);
... | @JsonProperty("bpartnerLocationId")
private final int bpartnerLocationId;
@JsonCreator
private BPartnerId(
@JsonProperty("bpartnerId") final int bpartnerId,
@JsonProperty("bpartnerLocationId") final int bpartnerLocationId)
{
if (bpartnerId < 1)
{
throw new IllegalArgumentException("bpartnerId shall be... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\types\BPartnerId.java | 2 |
请完成以下Java代码 | public class RuleNodeDebugEventFilter extends DebugEventFilter {
@Schema(description = "String value representing msg direction type (incoming to entity or outcoming from entity)", allowableValues = {"IN", "OUT"})
protected String msgDirectionType;
@Schema(description = "String value representing the entit... | protected String dataSearch;
@Schema(description = "The case insensitive 'contains' filter based on metadata (key and value) for the message.", example = "deviceName")
protected String metadataSearch;
@Override
public EventType getEventType() {
return EventType.DEBUG_RULE_NODE;
}
@Over... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\event\RuleNodeDebugEventFilter.java | 1 |
请完成以下Java代码 | public String toStringX()
{
return "MElementValue[" + get_ID() + "," + getValue() + " - " + getName() + "]";
}
@Override
protected boolean beforeSave(boolean newRecord)
{
//
// Transform to summary level account
if (!newRecord && isSummary() && is_ValueChanged(COLUMNNAME_IsSummary))
{
//
// Check ... | @Override
protected boolean afterSave(boolean newRecord, boolean success)
{
// Value/Name change
if (!newRecord && (is_ValueChanged(COLUMNNAME_Value) || is_ValueChanged(COLUMNNAME_Name)))
{
MAccount.updateValueDescription(getCtx(), "Account_ID=" + getC_ElementValue_ID(), get_TrxName());
if ("Y".equals(Env... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MElementValue.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void create(App resources) {
// 验证应用名称是否存在恶意攻击payload,https://github.com/elunez/eladmin/issues/873
String appName = resources.getName();
if (appName.contains(";") || appName.contains("|") || appName.contains("&")) {
throw new IllegalArgumentException("非法的应用名称,请勿包含[; | &]等特殊字符"... | public void delete(Set<Long> ids) {
for (Long id : ids) {
appRepository.deleteById(id);
}
}
@Override
public void download(List<AppDto> queryAll, HttpServletResponse response) throws IOException {
List<Map<String, Object>> list = new ArrayList<>();
for (AppDto ap... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\service\impl\AppServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class GeodeConfiguration {
// TODO: Replace with the SDG `@EnableCachingDefineRegions annotation declared above (and currently commented out,
// because...) once DATAGEODE-219 is resolved. :(
// tag::region[]
@Bean("YellowPages")
public ClientRegionFactoryBean<Object, Object> yellowPagesRegion(GemFireCach... | // tag::subscription-cache-listener[]
@Bean
RegionConfigurer subscriptionCacheListenerRegionConfigurer() {
return new RegionConfigurer() {
@Override
@SuppressWarnings("unchecked")
public void configure(String beanName, ClientRegionFactoryBean<?, ?> clientRegion) {
CacheListener subscriptionCacheList... | 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 String getName() {
return this.name;
}
/**
* Returns an {@link Optional} {@link String} containing {@link User User's} password.
*
* @return an {@link Optional} {@link String} containing {@link User User's} password.
* @see java.util.Optional
*/
public Optional<String> getPassword() {
return Op... | if (!(obj instanceof User)) {
return false;
}
User that = (User) obj;
return this.getName().equals(that.getName());
}
@Override
public int hashCode() {
int hashValue = 17;
hashValue = 37 * hashValue + ObjectUtils.nullSafeHashCode(getName());
return hashValue;
}
@Override
public String toStri... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\env\support\User.java | 1 |
请完成以下Java代码 | public void setMD_Cockpit(final de.metas.material.cockpit.model.I_MD_Cockpit MD_Cockpit)
{
set_ValueFromPO(COLUMNNAME_MD_Cockpit_ID, de.metas.material.cockpit.model.I_MD_Cockpit.class, MD_Cockpit);
}
@Override
public void setMD_Cockpit_ID (final int MD_Cockpit_ID)
{
if (MD_Cockpit_ID < 1)
set_Value (COLUM... | public int getM_Warehouse_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID);
}
@Override
public void setQtyPending (final BigDecimal QtyPending)
{
set_Value (COLUMNNAME_QtyPending, QtyPending);
}
@Override
public BigDecimal getQtyPending()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAM... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_MD_Cockpit_DDOrder_Detail.java | 1 |
请完成以下Java代码 | public String sendCmd(@NonNull final String cmd)
{
try (final Socket clientSocket = new Socket(hostName, port);
final OutputStream out = clientSocket.getOutputStream();)
{
clientSocket.setSoTimeout(readTimeoutMillis);
logger.debug("Writing cmd to the socket: {}", cmd);
out.write(cmd.getBytes(ICmd.DEF... | 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... | repos\metasfresh-new_dawn_uat\backend\de.metas.device.scales\src\main\java\de\metas\device\scales\endpoint\TcpConnectionEndPoint.java | 1 |
请完成以下Java代码 | public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public Coordinates getCoordina... | }
public int getSpeedKmPerS() {
return speedKmPerS;
}
public void setSpeedKmPerS(int speedKmPerS) {
this.speedKmPerS = speedKmPerS;
}
}
class Coordinates {
@JsonProperty("latitude")
private double latitude;
@JsonProperty("longitude")
private double longitude;
pu... | repos\tutorials-master\json-modules\json-operations\src\main\java\com\baeldung\sorting\SolarEvent.java | 1 |
请完成以下Java代码 | public ConditionExpression newInstance(ModelTypeInstanceContext instanceContext) {
return new ConditionExpressionImpl(instanceContext);
}
});
typeAttribute = typeBuilder.stringAttribute(XSI_ATTRIBUTE_TYPE)
.namespace(XSI_NS)
.defaultValue("tFormalExpression")
.build();
... | return typeAttribute.getValue(this);
}
public void setType(String type) {
typeAttribute.setValue(this, type);
}
public String getCamundaResource() {
return camundaResourceAttribute.getValue(this);
}
public void setCamundaResource(String camundaResource) {
camundaResourceAttribute.setValue(thi... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ConditionExpressionImpl.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_C_ElementValue getUser1()
{
return get_ValueAsPO(COLUMNNAME_User1_ID, org.compiere.model.I_C_ElementValue.class);
}
@Override
public void setUser1(org.compiere.model.I_C_ElementValue User1)
{
set_ValueFromPO(COLUMNNAME_User1_ID, org.compiere.model.I_C_ElementValue.class, User1);
}... | Integer ii = (Integer)get_Value(COLUMNNAME_User2_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set User Element 1.
@param UserElement1_ID
User defined accounting Element
*/
@Override
public void setUserElement1_ID (int UserElement1_ID)
{
if (UserElement1_ID < 1)
set_Value (COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_Summary.java | 1 |
请完成以下Java代码 | public java.math.BigDecimal getQtyDelivered_TU ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyDelivered_TU);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Bestellte Menge (LU).
@param QtyOrdered_LU
Bestellte Menge (LU)
*/
@Override
public void setQtyOrdered_LU (java.mat... | if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Ausliefermenge (LU).
@param QtyToDeliver_LU Ausliefermenge (LU) */
@Override
public void setQtyToDeliver_LU (java.math.BigDecimal QtyToDeliver_LU)
{
set_Value (COLUMNNAME_QtyToDeliver_LU, QtyToDeliver_LU);
}
/** Get Ausliefermenge (LU).
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_Tour_Instance.java | 1 |
请完成以下Java代码 | public void benchMurmur3_128(ExecutionPlan plan) {
for (int i = plan.iterations; i > 0; i--) {
plan.murmur3.putString(plan.password, Charset.defaultCharset());
}
plan.murmur3.hash();
}
@Benchmark
@Fork(value = 1, warmups = 1)
@BenchmarkMode(Mode.Throughput)
pub... | @Benchmark
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@BenchmarkMode(Mode.AverageTime)
public void blackHole(Blackhole blackhole) {
blackhole.consume(new Object());
}
@Benchmark
public double foldedLog() {
int x = 8;
return Math.log(x);
}
@Benchmark
public doubl... | repos\tutorials-master\jmh\src\main\java\com\baeldung\BenchMark.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Instant getLastUpdate(
@NonNull final List<I_M_Product_AlbertaPackagingUnit> packagingUnitList,
@NonNull final List<I_M_Product_AlbertaTherapy> therapies,
@NonNull final List<I_M_Product_AlbertaBillableTherapy> billableTherapies,
@Nullable final I_M_Product_AlbertaArticle albertaArticle,
@Nullabl... | .ifPresent(updateTimestamps::add);
return updateTimestamps
.stream()
.max(Instant::compareTo)
.orElseGet(() -> Instant.ofEpochMilli(0));
}
@NonNull
private AlbertaPackagingUnit recordToPackingUnit(@NonNull final I_M_Product_AlbertaPackagingUnit record)
{
return AlbertaPackagingUnit.builder()
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java\de\metas\vertical\healthcare\alberta\service\AlbertaCompositeProductProducer.java | 2 |
请完成以下Java代码 | public void setUsername(String username) {
this.username = username;
}
public void setPassword(String password) {
this.password = password;
}
// public Boolean getEnabled() {
// return enabled;
// }
public void setEnabled(Boolean enabled) {
this.enabled = enabl... | return locked;
}
public void setLocked(Boolean locked) {
this.locked = locked;
}
public List<Role> getRoles() {
return roles;
}
public void setRoles(List<Role> roles) {
this.roles = roles;
}
} | repos\springboot-demo-master\security\src\main\java\com\et\security\entity\User.java | 1 |
请完成以下Java代码 | public void setUserDiscount (java.math.BigDecimal UserDiscount)
{
set_Value (COLUMNNAME_UserDiscount, UserDiscount);
}
/** Get UserDiscount.
@return UserDiscount */
@Override
public java.math.BigDecimal getUserDiscount ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_UserDiscount);
if (bd == null... | /** Set Is webui role.
@param WEBUI_Role Is webui role */
@Override
public void setWEBUI_Role (boolean WEBUI_Role)
{
set_Value (COLUMNNAME_WEBUI_Role, Boolean.valueOf(WEBUI_Role));
}
/** Get Is webui role.
@return Is webui role */
@Override
public boolean isWEBUI_Role ()
{
Object oo = get_Value(CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Role.java | 1 |
请完成以下Java代码 | public ActiveOrHistoricCurrencyAndAmount getTtlChrgsAndTaxAmt() {
return ttlChrgsAndTaxAmt;
}
/**
* Sets the value of the ttlChrgsAndTaxAmt property.
*
* @param value
* allowed object is
* {@link ActiveOrHistoricCurrencyAndAmount }
*
*/
public void s... | * For example, to add a new item, do as follows:
* <pre>
* getRcrd().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ChargesRecord2 }
*
*
*/
public List<ChargesRecord2> getRcrd() {
if (rcrd == ... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\Charges4.java | 1 |
请完成以下Java代码 | public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@PrePersist
private void prePersist() {
logger.info("@... | @PostPersist
private void postPersist() {
logger.info("@PostPersist callback ...");
}
@PostUpdate
private void postUpdate() {
logger.info("@PostUpdate callback ...");
}
@PostRemove
private void postRemove() {
logger.info("@PostRemove callback ...");
}
@Over... | repos\Hibernate-SpringBoot-master\HibernateSpringBootJpaCallbacks\src\main\java\com\bookstore\entity\Author.java | 1 |
请完成以下Java代码 | LocalDate getFirstDayOfMonth() {
LocalDate firstDayOfMonth = LocalDate.now()
.with(TemporalAdjusters.firstDayOfMonth());
return firstDayOfMonth;
}
boolean isLeapYear(LocalDate localDate) {
return localDate.isLeapYear();
}
LocalDateTime getStartOfDay(LocalDate localD... | LocalDateTime getStartOfDayAtMidnightTime(LocalDate localDate) {
LocalDateTime startofDay = localDate.atTime(LocalTime.MIDNIGHT);
return startofDay;
}
LocalDateTime getEndOfDay(LocalDate localDate) {
LocalDateTime endOfDay = localDate.atTime(LocalTime.MAX);
return endOfDay;
... | repos\tutorials-master\core-java-modules\core-java-8-datetime\src\main\java\com\baeldung\datetime\UseLocalDate.java | 1 |
请完成以下Java代码 | public String getAlias() {
return alias;
}
@Override
public String getStorePwd() {
return storePwd;
}
@Override
public String getKeyPwd() {
return keyPwd;
}
/** | * <p>项目名称: true-license-demo </p>
* <p>文件名称: CustomKeyStoreParam.java </p>
* <p>方法描述: 用于将公私钥存储文件存放到其他磁盘位置而不是项目中,AbstractKeyStoreParam 里面的 getStream() 方法默认文件是存储的项目中 </p>
* <p>创建时间: 2020/10/10 13:31 </p>
*
* @param
* @return java.io.InputStream
* @author 方瑞冬
* @version 1.0
*/
... | repos\springboot-demo-master\SoftwareLicense\src\main\java\com\et\license\license\CustomKeyStoreParam.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isRegisterDefaultServlet() {
return this.registerDefaultServlet;
}
public void setRegisterDefaultServlet(boolean registerDefaultServlet) {
this.registerDefaultServlet = registerDefaultServlet;
}
public Map<String, String> getContextParameters() {
return this.contextParameters;
}
p... | * Strategies for supporting forward headers.
*/
public enum ForwardHeadersStrategy {
/**
* Use the underlying container's native support for forwarded headers.
*/
NATIVE,
/**
* Use Spring's support for handling forwarded headers.
*/
FRAMEWORK,
/**
* Ignore X-Forwarded-* headers.
*/
N... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\autoconfigure\ServerProperties.java | 2 |
请完成以下Java代码 | public void setWEBUI_NameNew (java.lang.String WEBUI_NameNew)
{
set_Value (COLUMNNAME_WEBUI_NameNew, WEBUI_NameNew);
}
/** Get New record name.
@return New record name */
@Override
public java.lang.String getWEBUI_NameNew ()
{
return (java.lang.String)get_Value(COLUMNNAME_WEBUI_NameNew);
}
/** Set Ne... | public static final String WIDGETSIZE_Large = "L";
/** Set Widget size.
@param WidgetSize Widget size */
@Override
public void setWidgetSize (java.lang.String WidgetSize)
{
set_Value (COLUMNNAME_WidgetSize, WidgetSize);
}
/** Get Widget size.
@return Widget size */
@Override
public java.lang.String ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Element.java | 1 |
请完成以下Java代码 | public final class OAuth2AuthorizationServerMetadata extends AbstractOAuth2AuthorizationServerMetadata {
@Serial
private static final long serialVersionUID = 3993358339217009284L;
private OAuth2AuthorizationServerMetadata(Map<String, Object> claims) {
super(claims);
}
/**
* Constructs a new {@link Builder} ... | /**
* Helps configure an {@link OAuth2AuthorizationServerMetadata}.
*/
public static final class Builder extends AbstractBuilder<OAuth2AuthorizationServerMetadata, Builder> {
private Builder() {
}
/**
* Validate the claims and build the {@link OAuth2AuthorizationServerMetadata}.
* <p>
* The follow... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\OAuth2AuthorizationServerMetadata.java | 1 |
请完成以下Java代码 | public int getAD_Attachment_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Attachment_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_AD_Table getAD_Table() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_AD_Table_ID, org.compiere.model.I_... | public java.sql.Timestamp getMigrationDate ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_MigrationDate);
}
/** 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, nu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attachment.java | 1 |
请完成以下Java代码 | class InOutCostRowsLoader
{
@NonNull private final MoneyService moneyService;
@NonNull final LookupDataSource bpartnerLookup;
@NonNull final LookupDataSource orderLookup;
@NonNull final LookupDataSource inoutLookup;
@NonNull final LookupDataSource costTypeLookup;
@Builder
private InOutCostRowsLoader(
final @... | private InOutCostRow toRow(final InOutCost inoutCost)
{
final Money costAmountToInvoice = inoutCost.getCostAmountToInvoice();
return InOutCostRow.builder()
.inoutCostId(inoutCost.getId())
.bpartner(bpartnerLookup.findById(inoutCost.getBpartnerId()))
.purchaseOrder(orderLookup.findById(inoutCost.getOrd... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoice\match_inout_costs\InOutCostRowsLoader.java | 1 |
请完成以下Java代码 | public void updateCountryId(final I_C_Fiscal_Representation fiscalRep)
{
if (fiscalRep.getC_BPartner_Location_ID() > 0)
{
final BPartnerLocationId bpLocation = BPartnerLocationId.ofRepoId(fiscalRep.getC_BPartner_Representative_ID(), fiscalRep.getC_BPartner_Location_ID());
final CountryId countryId = bpartner... | {
final ICompositeQueryFilter<I_C_Fiscal_Representation> validToFilter = queryBL.createCompositeQueryFilter(I_C_Fiscal_Representation.class)
.setJoinOr()
.addCompareFilter(I_C_Fiscal_Representation.COLUMN_ValidTo, CompareQueryFilter.Operator.GREATER_OR_EQUAL, date)
.addEqualsFilter(I_C_Fiscal_Representati... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\organization\impl\FiscalRepresentationBL.java | 1 |
请完成以下Java代码 | public static boolean isEmpty(@SuppressWarnings("rawtypes") Collection collection) {
return (collection == null || collection.isEmpty());
}
public static boolean isNotEmpty(@SuppressWarnings("rawtypes") Collection collection) {
return !isEmpty(collection);
}
public static <T> List<List... | if (valuesSize <= partitionSize) {
partitionConsumer.accept(valuesList);
} else {
for (int startIndex = 0; startIndex < valuesSize; startIndex += partitionSize) {
int endIndex = startIndex + partitionSize;
if (endIndex > valuesSize) {
... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\util\CollectionUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SQLValidationRule implements IValidationRule
{
String name;
@NonNull IStringExpression prefilterWhereClause;
@NonNull ImmutableSet<String> dependsOnTableNames;
@Builder
private SQLValidationRule(
final String name,
@NonNull final IStringExpression prefilterWhereClause,
@Singular final Set<St... | final IStringExpression sqlWhereClauseExpr = IStringExpression.compileOrDefault(sqlWhereClauseNorm, IStringExpression.NULL);
return ofNullableSqlWhereClause(sqlWhereClauseExpr);
}
public static IValidationRule ofNullableSqlWhereClause(@Nullable final IStringExpression sqlWhereClauseExpr)
{
if (sqlWhereClauseExp... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\impl\SQLValidationRule.java | 2 |
请完成以下Java代码 | public class HazelcastCacheMeterBinderProvider implements CacheMeterBinderProvider<HazelcastCache> {
@Override
public MeterBinder getMeterBinder(HazelcastCache cache, Iterable<Tag> tags) {
try {
return new HazelcastCacheMetrics(cache.getNativeCache(), tags);
}
catch (NoSuchMethodError ex) {
// Hazelcast ... | }
}
static class HazelcastCacheMeterBinderProviderRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
try {
Method getNativeCacheMethod = ReflectionUtils.findMethod(HazelcastCache.class, "getNativeCache");
Assert... | repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\metrics\HazelcastCacheMeterBinderProvider.java | 1 |
请完成以下Java代码 | public byte[] getBase64() {
return base64;
}
/**
* Sets the value of the base64 property.
*
* @param value
* allowed object is
* byte[]
*/
public void setBase64(byte[] value) {
this.base64 = value;
}
/**
* Gets the value of the url proper... | * Gets the value of the mimeType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMimeType() {
return mimeType;
}
/**
* Sets the value of the mimeType property.
*
* @param value
* allowed object i... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\DocumentType.java | 1 |
请完成以下Java代码 | protected void createAndStartGrpcServer() throws IOException {
if (this.server == null) {
final Server localServer = this.factory.createServer();
this.server = localServer;
localServer.start();
final String address = this.factory.getAddress();
final in... | // Wait for the server to shutdown completely before continuing with destroying the spring context
try {
if (millis > 0) {
localServer.awaitTermination(millis, MILLISECONDS);
} else if (millis == 0) {
// Do not wait
} el... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\serverfactory\GrpcServerLifecycle.java | 1 |
请完成以下Java代码 | public class XxlJobUser {
private int id;
private String username; // 账号
private String password; // 密码
private int role; // 角色:0-普通用户、1-管理员
private String permission; // 权限:执行器ID列表,多个逗号分割
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {... | }
public void setPermission(String permission) {
this.permission = permission;
}
// plugin
public boolean validPermission(int jobGroup){
if (this.role == 1) {
return true;
} else {
if (StringUtils.hasText(this.permission)) {
for (String permissionItem : this.permission.split(",")) {
if (Strin... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobUser.java | 1 |
请完成以下Java代码 | public int exactMatchSearch(String key)
{
return exactMatchSearch(key.getBytes(utf8));
}
/**
* Returns the corresponding value if the key is found. Otherwise returns -1.
*
* @param key search key
* @return found value
*/
public int exactMatchSearch(byte[] key)
{
... | int offset,
int maxResults)
{
ArrayList<Pair<Integer, Integer>> result = new ArrayList<Pair<Integer, Integer>>();
int unit = _array[0];
int nodePos = 0;
// nodePos ^= unit.offset();
nodePos ^= ((unit >>> 10) << ((unit... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\DoubleArray.java | 1 |
请完成以下Java代码 | public class XxlJobRegistry {
private int id;
private String registryGroup;
private String registryKey;
private String registryValue;
private Date updateTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getRegist... | public void setRegistryKey(String registryKey) {
this.registryKey = registryKey;
}
public String getRegistryValue() {
return registryValue;
}
public void setRegistryValue(String registryValue) {
this.registryValue = registryValue;
}
public Date getUpdateTime() {
... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobRegistry.java | 1 |
请完成以下Java代码 | private Resource asLoaderHidingResource(Resource resource) {
return (resource instanceof LoaderHidingResource) ? resource : new LoaderHidingResource(this.base, resource);
}
@Override
public @Nullable Resource resolve(String subUriPath) {
if (subUriPath.startsWith(LOADER_RESOURCE_PATH_PREFIX)) {
return null;
... | public void copyTo(Path destination) throws IOException {
this.delegate.copyTo(destination);
}
@Override
public Collection<Resource> getAllResources() {
return asLoaderHidingResources(this.delegate.getAllResources());
}
@Override
public String toString() {
return this.delegate.toString();
}
} | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\servlet\LoaderHidingResource.java | 1 |
请完成以下Java代码 | public HistoricBatchQuery orderByStartTime() {
return orderBy(HistoricBatchQueryProperty.START_TIME);
}
public HistoricBatchQuery orderByEndTime() {
return orderBy(HistoricBatchQueryProperty.END_TIME);
}
@Override
public HistoricBatchQuery orderByTenantId() {
return orderBy(HistoricBatchQueryPro... | checkQueryOk();
return commandContext
.getHistoricBatchManager()
.findBatchCountByQueryCriteria(this);
}
@Override
public List<HistoricBatch> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext
.getHistoricBatchManager()
.findBatchesByQ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Quantity computeQtyOfSparePartsAlreadyReturned(
@NonNull final ProductId sparePartId,
@NonNull final I_C_UOM uom,
@NonNull final QuantityUOMConverter uomConverter)
{
Quantity qtyTotal = Quantity.zero(uom);
final UomId uomId = UomId.ofRepoId(uom.getC_UOM_ID());
for (final SparePart sparePart : get... | {
return sparePartsBOM.getLines().stream().map(QtyCalculationsBOMLine::getProductId);
}
@Nullable
public Quantity computeQtyOfComponentsRequired(
@NonNull final ProductId componentId,
@NonNull final QuantityUOMConverter uomConverter)
{
final QtyCalculationsBOMLine bomLine = sparePartsBOM.getLineB... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\customerreturns\SparePartsReturnCalculation.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public SecurityFilterChain authorizationServerSecurityFilterChain(HttpSecurity http) throws Exception {
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http);
http.getConfigurer(OAuth2AuthorizationServerConfigurer.class)
.oidc(Customizer.withDefaults()); // Enable OpenID Connect ... | public SecurityFilterChain defaultSecurityFilterChain(HttpSecurity http)
throws Exception {
http
.authorizeHttpRequests((authorize) -> authorize
.anyRequest().authenticated()
)
// Form login handles the redirect to the login page from the
/... | repos\tutorials-master\libraries-security-2\src\main\java\com\baeldung\scribejava\oauth\AuthServiceConfig.java | 2 |
请完成以下Java代码 | public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID < 1)
set_Value (COLUMNNAME_AD_Table_ID, null);
else
set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID));
}
/** Get Table.
@return Database Table information
*/
public int getAD_Table_ID ()
{
Integer ii = (Integer)get_V... | Integer ii = (Integer)get_Value(COLUMNNAME_LabelWidth);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintLabel.java | 1 |
请完成以下Java代码 | protected void switchVersionOfIncident(CommandContext commandContext, IncidentEntity incidentEntity, ProcessDefinitionEntity newProcessDefinition) {
incidentEntity.setProcessDefinitionId(newProcessDefinition.getId());
}
protected void validateAndSwitchVersionOfExecution(CommandContext commandContext, Execution... | "(id = '" + processInstanceId + "').");
}
// clear cached activity so that outgoing transitions are refreshed
execution.setActivity(newActivity);
}
// switch the process instance to the new process definition version
execution.setProcessDefinition(newProcessDefinition);
// a... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetProcessDefinitionVersionCmd.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_S_Resource getS_Resource()
{
return get_ValueAsPO(COLUMNNAME_S_Resource_ID, org.compiere.model.I_S_Resource.class);
}
@Override
public void setS_Resource(final org.compiere.model.I_S_Resource S_Resource)
{
set_ValueFromPO(COLUMNNAME_S_Resource_ID, org.compiere.model.I_S_Resource.cl... | final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_WorkingTime);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setYield (final int Yield)
{
set_Value (COLUMNNAME_Yield, Yield);
}
@Override
public int getYield()
{
return get_ValueAsInt(COLUMNNAME_Yield);
}
@Override
public vo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Product_Planning.java | 1 |
请完成以下Java代码 | public void invalidateAll()
{
invalidate(DocumentIdsSelection.ALL);
}
@Override
public void invalidate(@NonNull final DocumentIdsSelection rowIds)
{
final ImmutableSet<InvoiceId> invoiceIds = rowsHolder.getRecordIdsToRefresh(rowIds, InvoiceRow::convertDocumentIdToInvoiceId);
final ImmutableMap<DocumentId, ... | public void patchRow(final RowEditingContext ctx, final List<JSONDocumentChangedEvent> fieldChangeRequests)
{
final DocumentId rowIdToChange = ctx.getRowId();
rowsHolder.compute(rows -> rows.changingRow(rowIdToChange, row -> InvoiceRowReducers.reduce(row, fieldChangeRequests)));
}
public ImmutableList<InvoiceRo... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoiceRows.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HeadersExchangeParser extends AbstractExchangeParser {
@Override
protected Class<?> getBeanClass(Element element) {
return HeadersExchange.class;
}
@Override
protected BeanDefinitionBuilder parseBinding(String exchangeName, Element binding, ParserContext parserContext) {
BeanDefinitionBuilder bu... | if (hasKey ^ hasValue) {
parserContext.getReaderContext().error("Both 'key/value' attributes have to be declared.", binding);
}
if (argumentsElement == null) {
if (!hasKey & !hasValue) {
parserContext.getReaderContext()
.error("At least one of 'binding-arguments' sub-element or 'key/value' attribut... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\HeadersExchangeParser.java | 2 |
请完成以下Java代码 | public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
@Overr... | @Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Passenger passenger = (Passenger) o;
return Objects.equals(firstName, passenger.firstName) && Objects.equals(lastName, passenger.... | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-2\src\main\java\com\baeldung\jpa\domain\Passenger.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
@Override
public void setId(String id) {
// Not supported
}
@Override
public String getName() {
return name;
}
@Override
public void setName(String name) {
// Not supported
}
@Override
public String ... | return type;
}
@Override
public void setType(String string) {
// Not supported
}
public static GroupDetails create(Group group) {
return new GroupDetails(group.getId(), group.getName(), group.getType());
}
public static List<GroupDetails> create(List<Group> groups) {
... | repos\flowable-engine-main\modules\flowable-spring-security\src\main\java\org\flowable\spring\security\GroupDetails.java | 1 |
请完成以下Spring Boot application配置 | # H2
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
spring.profiles.active=h2
# MySQL
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.username=mysqluser
#spring.datasourc... | 06/myDb?createDatabaseIfNotExist=true
# MultiTenantApplication
defaultTenant=tenant_1
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect | repos\tutorials-master\persistence-modules\spring-jpa\src\main\resources\application.properties | 2 |
请完成以下Java代码 | protected boolean afterSave (boolean newRecord)
{
log.info("beforeSave");
//int p_A_Asset_ID = 0;
int p_wkasset_ID = 0;
//p_A_Asset_ID = getA_Asset_ID();
p_wkasset_ID = getA_Depreciation_Workfile_ID();
StringBuffer sqlB = new StringBuffer ("UPDATE A_Depreciation_Workfile "
+ "SET Processing = 'Y'"... | setA_Accumulated_Depr(new BigDecimal(0.0));
if (new BigDecimal(getA_Period_Posted()).equals(null))
setA_Period_Posted(0);
MAssetChange change = new MAssetChange (getCtx(), 0,null);
log.info("0");
String sql2 = "SELECT COUNT(*) FROM A_Depreciation_Workfile WHERE A_Asset_ID=? AND PostingType = ?";
i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MDepreciationWorkfile.java | 1 |
请完成以下Java代码 | private OrderLineCandidate toOrderLineCandidate(final I_C_OrderLine ol)
{
final ImmutableAttributeSet attributeSet = asiBL.getImmutableAttributeSetById(AttributeSetInstanceId.ofRepoId(ol.getM_AttributeSetInstance_ID()));
return OrderLineCandidate.builder()
.orderId(OrderId.ofRepoId(ol.getC_Order_ID()))
.p... | newOrderLine.setExplodedFrom_BOMLine_ID(candidate.getExplodedFromBOMLineId().getRepoId());
final GroupId compensationGroupId = candidate.getCompensationGroupId();
if (compensationGroupId != null)
{
final Group group = orderGroupsRepo.retrieveGroupIfExists(compensationGroupId);
final ActivityId groupActiv... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\process\C_Order_CreatePOFromSOs.java | 1 |
请完成以下Java代码 | private IHUAttributeTransferStrategy getHUAttributeTransferStrategy(final IHUAttributeTransferRequest request, final I_M_Attribute attribute)
{
final IAttributeSet attributesFrom = request.getAttributesFrom();
if (attributesFrom instanceof IAttributeStorage)
{
return ((IAttributeStorage)attributesFrom).retrie... | Collections.emptyList(), // trxs
attributeTrxs // attribute transactions
);
}
@Override
public IAllocationResult createAndProcessAllocationResult()
{
final IAllocationResult result = createAllocationResult();
Services.get(IHUTrxBL.class).createTrx(huContext, result);
return result;
}
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUTransactionAttributeBuilder.java | 1 |
请完成以下Java代码 | public class MainPart
{
/**
* 主语
*/
public TreeGraphNode subject;
/**
* 谓语
*/
public TreeGraphNode predicate;
/**
* 宾语
*/
public TreeGraphNode object;
/**
* 结果
*/
public String result;
public MainPart(TreeGraphNode subject, TreeGraphNode pred... | /**
* 结果填充完成
*/
public void done()
{
result = predicate.toString("value");
if (subject != null)
{
result = subject.toString("value") + result;
}
if (object != null)
{
result = result + object.toString("value");
}
}
... | repos\springboot-demo-master\neo4j\src\main\java\com\et\neo4j\hanlp\MainPart.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceVerificationSetLineId implements RepoIdAware
{
@JsonCreator
public static InvoiceVerificationSetLineId ofRepoId(final int repoId)
{
return new InvoiceVerificationSetLineId(repoId);
}
@Nullable
public static InvoiceVerificationSetLineId ofRepoIdOrNull(final int repoId)
{
return repoId > 0... | {
this.repoId = Check.assumeGreaterThanZero(repoId, "M_MatchInv_ID");
}
@JsonValue
@Override
public int getRepoId()
{
return repoId;
}
public static int toRepoId(final InvoiceVerificationSetLineId id)
{
return id != null ? id.getRepoId() : -1;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\InvoiceVerificationSetLineId.java | 2 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:mysql://localhost:3306/bookstoredb?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring.datasource.initi... | s.hibernate.connection.provider_disables_autocommit=true
# Enable logging for HikariCP to verify that it is used
logging.level.com.zaxxer.hikari.HikariConfig=DEBUG
logging.level.com.zaxxer.hikari=TRACE | repos\Hibernate-SpringBoot-master\HibernateSpringBootDelayConnection\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public boolean isPickingSourceHURow()
{
return pickingSlotRowId.isPickingSourceHURow();
}
public WarehouseId getPickingSlotWarehouseId()
{
return pickingSlotWarehouse != null ? WarehouseId.ofRepoId(pickingSlotWarehouse.getIdAsInt()) : null;
}
public BigDecimal getHuQtyCU()
{
return huQtyCU;
}
public P... | if (huId == null)
{
throw new AdempiereException("Not a PickedHURow!")
.appendParametersToMessage()
.setParameter("PickingSlotRow", this);
}
final boolean hasOpenPickingForOrderId = getPickingOrderIdsForHUId(huId).contains(orderId);
if (hasOpenPickingForOrderId)
{
return true;
}
if (isL... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotRow.java | 1 |
请完成以下Java代码 | protected ELResolver createElResolver(VariableScope variableScope) {
CompositeELResolver elResolver = new CompositeELResolver();
elResolver.add(new VariableScopeElResolver(variableScope));
if (customELResolvers != null) {
customELResolvers.forEach(elResolver::add);
}
... | }
public void setBeans(Map<Object, Object> beans) {
this.beans = beans;
}
public ELContext getElContext(Map<String, Object> availableVariables) {
CompositeELResolver elResolver = new CompositeELResolver();
addBaseResolvers(elResolver);
return new ELContextBuilder()
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\el\ExpressionManager.java | 1 |
请完成以下Java代码 | protected final void assertNotActive(final String errmsg)
{
assertActive(false, errmsg);
}
protected void assertActive(final boolean activeExpected, final String errmsg)
{
final boolean activeActual = isActive();
if (activeActual != activeExpected)
{
final String errmsgToUse = "Inconsistent transaction ... | final StringBuilder msg = new StringBuilder();
msg.append(trxStatusOld).append("->").append(trxStatus);
if (!Check.isEmpty(detailMsg, true))
{
msg.append(" (").append(detailMsg).append(")");
}
logTrxAction(msg.toString());
}
}
private void logTrxAction(final String message)
{
if (debugLog == ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\PlainTrx.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Resource getPropertiesResource() {
Resource result = this.resource;
if (result == null && this.resourceLocation != null) {
result = this.resourceLoader.getResource(this.resourceLocation);
}
Assert.notNull(result, "resource cannot be null if resourceLocation is null");
return result;
}
/**
* Cr... | */
public static UserDetailsResourceFactoryBean fromResource(Resource propertiesResource) {
UserDetailsResourceFactoryBean result = new UserDetailsResourceFactoryBean();
result.setResource(propertiesResource);
return result;
}
/**
* Creates a UserDetailsResourceFactoryBean with a resource from the provided ... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\core\userdetails\UserDetailsResourceFactoryBean.java | 2 |
请完成以下Java代码 | private static String parseHost(String value) {
int index = String.valueOf(value).trim().indexOf("[");
return index > 0 ? value.trim().substring(0, index).trim()
: index != 0 && StringUtils.hasText(value) ? value.trim()
: DEFAULT_LOCATOR_HOST;
}
private static int parsePort(String value) {
Stri... | return result != 0 ? result : (this.getPort() - other.getPort());
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Locator)) {
return false;
}
Locator that = (Locator) obj;
return this.getHost().equals(that.getHost())
&& this... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\env\support\CloudCacheService.java | 1 |
请完成以下Java代码 | public Resource loadSecretKeyResource() {
return loadResource(secretKeyResource, secretKey, secretKeyLocation);
}
/**
* <p>getSecretKeyPasswordChars.</p>
*
* @return an array of {@link char} objects
*/
public char[] getSecretKeyPasswordChars() {
return secretKeyPassword.... | new FixedBase64ByteArraySaltGenerator(secretKeySalt));
}
@SneakyThrows
private IvGenerator instantiateIvGenerator() {
return (IvGenerator)Class.forName(this.ivGeneratorClassName).newInstance();
}
/**
* <p>getActualIvGenerator.</p>
*
* @return a {@link org.jasypt.iv.IvGenerat... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\encryptor\SimpleGCMConfig.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.