instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | private static boolean isAcceptNode(Object nodeObj)
{
if (nodeObj != null)
{
Class nodeObjClass = nodeObj.getClass();
if (nodeObjClass.equals(MDAGNode.class))
return ((MDAGNode) nodeObj).isAcceptNode();
else if (nodeObjClass.equals(SimpleMDAGNode.... | // sb.append(", charTreeSet=").append(charTreeSet);
// sb.append(", transitionCount=").append(transitionCount);
// sb.append('}');
// return sb.toString();
// }
/**
* 调试用
* @return
*/
public HashMap<MDAGNode, MDAGNode> _getEquivalenceClassMDAGNodeHashMap()
{
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\MDAG\MDAG.java | 1 |
请完成以下Java代码 | public void setUserPicture(String userId, Picture picture) {
commandExecutor.execute(new SetUserPictureCmd(userId, picture));
}
@Override
public Picture getUserPicture(String userId) {
return commandExecutor.execute(new GetUserPictureCmd(userId));
}
@Override
public String getU... | }
@Override
public List<PrivilegeMapping> getPrivilegeMappingsByPrivilegeId(String privilegeId) {
return commandExecutor.execute(new GetPrivilegeMappingsByPrivilegeIdCmd(privilegeId));
}
@Override
public void deletePrivilege(String id) {
commandExecutor.execute(new DeletePrivilegeC... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\IdmIdentityServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ExternalSystemGRSSignumConfigId implements IExternalSystemChildConfigId
{
int repoId;
@JsonCreator
@NonNull
public static ExternalSystemGRSSignumConfigId ofRepoId(final int repoId)
{
return new ExternalSystemGRSSignumConfigId(repoId);
}
@Nullable
public static ExternalSystemGRSSignumConfigId of... | return (ExternalSystemGRSSignumConfigId)id;
}
private ExternalSystemGRSSignumConfigId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, I_ExternalSystem_Config_GRSSignum.COLUMNNAME_ExternalSystem_Config_GRSSignum_ID);
}
@Override
public ExternalSystemType getType()
{
return ExternalSyst... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\grssignum\ExternalSystemGRSSignumConfigId.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void transferVHUsFromProjectToSalesOrderLine(@NonNull final RepairSalesOrderInfo salesOrderInfo)
{
for (final RepairSalesOrderLineInfo line : salesOrderInfo.getLines())
{
if (line.getSparePartsVHUIds().isEmpty())
{
continue;
}
projectService.transferVHUsFromProjectToSalesOrderLine(
sal... | public void transferVHUsFromSalesOrderToProject(final RepairSalesOrderInfo salesOrderInfo)
{
projectService.transferVHUsFromSalesOrderToProject(
salesOrderInfo.getSalesOrderLineIds(),
salesOrderInfo.getProjectId());
}
public void unlinkProposalFromProject(@NonNull final RepairSalesProposalInfo proposalInf... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\sales_order\RepairSalesOrderService.java | 2 |
请完成以下Java代码 | private static Integer convertToInt(final Object itemObj)
{
if (itemObj == null)
{
// pass-through, even though it will produce an exception when the list will be converted to immutable list
return null;
}
else if (itemObj instanceof Number)
{
return ((Number)itemObj).intValue();
}
else if (item... | return new DocumentFilterParam(this);
}
public Builder setJoinAnd(final boolean joinAnd)
{
this.joinAnd = joinAnd;
return this;
}
public Builder setFieldName(final String fieldName)
{
this.fieldName = fieldName;
return this;
}
public Builder setOperator(@NonNull final Operator operator)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilterParam.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Post {
@Id
private Integer id;
private String title;
private String content;
@OneToMany(mappedBy = "post")
private List<Comment> comments;
public Post() {
}
public Post(Integer id, String title, String content) {
this.id = id;
this.title = title;
... | return content;
}
public void setContent(String content) {
this.content = content;
}
public List<Comment> getComments() {
return comments;
}
public void setComments(List<Comment> comments) {
this.comments = comments;
}
@Override
public boolean equals(Objec... | repos\tutorials-master\persistence-modules\spring-data-jpa-simple\src\main\java\com\baeldung\jpa\aggregation\model\Post.java | 2 |
请完成以下Java代码 | protected boolean isAbleToHandle(@Nullable Resource resource) {
return resource != null;
}
/**
* Writes the given data to the target {@link Resource} (intentionally) by using the {@link OutputStream}
* returned by {@link WritableResource#getOutputStream()}.
*
* However, other algorithm/strategy implementat... | * @see java.io.OutputStream
*/
protected abstract void doWrite(OutputStream resourceOutputStream, byte[] data) throws IOException;
/**
* Pre-processes the target {@link WritableResource} before writing to the {@link WritableResource}.
*
* @param resource {@link WritableResource} to pre-process; never {@liter... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\io\AbstractResourceWriter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setApplicationContext(ApplicationContext context) throws BeansException {
this.preAuthorizeAuthorizationManager.setApplicationContext(context);
this.postAuthorizeAuthorizationManager.setApplicationContext(context);
}
@Autowired(required = false)
void setTemplateDefaults(AnnotationTemplateExpressionD... | static MethodInterceptor postFilterAuthorizationMethodInterceptor(
ObjectProvider<ReactiveAuthorizationManagerMethodSecurityConfiguration> _reactiveMethodSecurityConfiguration) {
return new DeferringMethodInterceptor<>(postFilterPointcut,
() -> _reactiveMethodSecurityConfiguration.getObject().postFilterMethodI... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\method\configuration\ReactiveAuthorizationManagerMethodSecurityConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private static List<GrantedAuthority> getGrantedAuthorities(String... roles) {
ArrayList<GrantedAuthority> authorities = new ArrayList<>();
for (String role : roles) {
authorities.add(new SimpleGrantedAuthority(role));
}
return authorities;
}
public CustomUser loadUs... | return DB_BASED_USER_MAPPING.containsKey(username);
}
public boolean isValidRole(String roleName) {
return roleName.startsWith("ROLE_");
}
public List<String> getAllUsernames() {
List<String> usernames = new ArrayList<>();
usernames.add("jane");
usernames.add("john");
... | repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\methodsecurity\repository\UserRoleRepository.java | 2 |
请完成以下Java代码 | public void setUnitsCycles (final @Nullable BigDecimal UnitsCycles)
{
set_Value (COLUMNNAME_UnitsCycles, UnitsCycles);
}
@Override
public BigDecimal getUnitsCycles()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_UnitsCycles);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void ... | /** Document Process = P */
public static final String WORKFLOWTYPE_DocumentProcess = "P";
/** Document Value = V */
public static final String WORKFLOWTYPE_DocumentValue = "V";
/** Manufacturing = M */
public static final String WORKFLOWTYPE_Manufacturing = "M";
/** Quality = Q */
public static final String WOR... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Workflow.java | 1 |
请完成以下Java代码 | public static void updateAllRoles()
{
final ClientId clientId = null; // all
updateAllRoles(clientId);
}
public static void updateAllRoles(final ClientId clientId)
{
Services.get(IRoleDAO.class).retrieveAllRolesWithAutoMaintenance()
.stream()
.filter(role -> isRoleMatchingClientId(role, clientId))
... | {
return true;
}
return ClientId.equals(role.getClientId(), clientId);
}
/**
* Update Role
*/
private static void updateRole(final Role role)
{
final String result = Services.get(IUserRolePermissionsDAO.class).updateAccessRecords(role);
Loggables.withLogger(logger, Level.DEBUG).addLog("Role access ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\RoleAccessUpdate.java | 1 |
请完成以下Java代码 | public boolean isDisabled()
{
return disabled != null && disabled;
}
@JsonIgnore
public boolean isEnabled()
{
return !isDisabled();
}
public boolean isQuickAction()
{
return quickAction;
}
public boolean isDefaultQuickAction() | {
return defaultQuickAction;
}
private int getSortNo()
{
return sortNo;
}
@JsonAnyGetter
public Map<String, Object> getDebugProperties()
{
return debugProperties;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\json\JSONDocumentAction.java | 1 |
请完成以下Java代码 | public final class OAuth2DeviceCodeAuthenticationConverter implements AuthenticationConverter {
@Nullable
@Override
public Authentication convert(HttpServletRequest request) {
MultiValueMap<String, String> parameters = OAuth2EndpointUtils.getFormParameters(request);
// grant_type (REQUIRED)
String grantType ... | OAuth2EndpointUtils.throwError(OAuth2ErrorCodes.INVALID_REQUEST, OAuth2ParameterNames.DEVICE_CODE,
OAuth2EndpointUtils.ACCESS_TOKEN_REQUEST_ERROR_URI);
}
Map<String, Object> additionalParameters = new HashMap<>();
parameters.forEach((key, value) -> {
if (!key.equals(OAuth2ParameterNames.GRANT_TYPE) && !k... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\web\authentication\OAuth2DeviceCodeAuthenticationConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JedisConnectionFactory redisConnectionFactory() {
JedisConnectionFactory redisConnectionFactory = new JedisConnectionFactory();
redisConnectionFactory.setHostName(env.getProperty("redis.hostname"));
redisConnectionFactory.setPort(Integer.parseInt(env.getProperty("redis.port")));
r... | @Override
public void handleCachePutError(RuntimeException exception, Cache cache, Object key, Object value) {
logger.warn("handleCachePutError in redis: {}", exception.getMessage());
}
@Override
public void handleCacheEvictError(RuntimeException exceptio... | repos\springBoot-master\springboot-Cache\src\main\java\com\us\example\config\RedisConfig.java | 2 |
请完成以下Java代码 | public void addTrigger(final int jobId,
final TriggerTypeEnum triggerType,
final int failRetryCount,
final String executorShardingParam,
final String executorParam,
final String address... | // ---------------------- helper ----------------------
private static JobTriggerPoolHelper helper = new JobTriggerPoolHelper();
public static void toStart() {
helper.start();
}
public static void toStop() {
helper.stop();
}
/**
* @param jobId
* @param triggerType
... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\thread\JobTriggerPoolHelper.java | 1 |
请完成以下Java代码 | private Optional<HUEditorView> getPackingHUsViewIfExists(final ViewId packingHUsViewId)
{
final PickingSlotsClearingView pickingSlotsClearingView = getPickingSlotsClearingView(packingHUsViewId);
return pickingSlotsClearingView.getPackingHUsViewIfExists(packingHUsViewId);
}
private HUEditorView getOrCreatePacki... | private RelatedProcessDescriptor createProcessDescriptor(final Class<? extends JavaProcess> processClass)
{
return RelatedProcessDescriptor.builder()
.processId(adProcessDAO.retrieveProcessIdByClass(processClass))
.anyTable().anyWindow()
.displayPlace(DisplayPlace.ViewQuickActions)
.build();
}
pri... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\PackingHUsViewFactory.java | 1 |
请完成以下Java代码 | private AsyncBatchId createAsyncBatch()
{
// Create Async Batch for tracking
return asyncBatchBL.newAsyncBatch()
.setContext(getCtx())
.setC_Async_Batch_Type(LetterConstants.C_Async_Batch_InternalName_CreateLettersAsync)
.setAD_PInstance_Creator_ID(getPinstanceId())
.setName("Create Letters for Cam... | // should not happen
return;
}
final I_MKTG_Campaign_ContactPerson campaignContactPerson = load(campaignContactPersonId, I_MKTG_Campaign_ContactPerson.class);
final IWorkPackageQueueFactory workPackageQueueFactory = Services.get(IWorkPackageQueueFactory.class);
final IWorkPackageQueue queue = workPackageQu... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\serialletter\src\main\java\de\metas\letter\process\C_Letter_CreateFrom_MKTG_ContactPerson.java | 1 |
请完成以下Java代码 | public Object getReferencedObject(final String columnName, final Method interfaceMethod) throws Exception
{
return POWrapper.this.getReferencedObject(columnName, interfaceMethod);
}
@Override
public Set<String> getColumnNames()
{
return POWrapper.this.getColumnNames();
}
@Override
public int get... | ;
@Override
public boolean isCalculated(final String columnName)
{
return POWrapper.this.isCalculated(columnName);
}
@Override
public boolean hasColumnName(final String columnName)
{
return POWrapper.this.hasColumnName(columnName);
}
};
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\model\POWrapper.java | 1 |
请完成以下Java代码 | public static void downloadWithAHC(String url, String localFilename) throws ExecutionException, InterruptedException, IOException {
FileOutputStream stream = new FileOutputStream(localFilename);
AsyncHttpClient client = Dsl.asyncHttpClient();
client.prepareGet(url)
.execute(new Asy... | if (entity != null) {
try (InputStream inputStream = entity.getContent();
FileOutputStream fileOutputStream = new FileOutputStream(localFileName)) {
byte[] dataBuffer = new byte[1024];
int bytesRead;
... | repos\tutorials-master\core-java-modules\core-java-networking\src\main\java\com\baeldung\download\FileDownload.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SalesInvoiceCandidate
{
OrgId orgId;
InvoiceCandidateId id;
BPartnerId salesRepBPartnerId;
BPartnerId customerBPartnerId;
ProductId productId;
LocalDate commissionDate;
Instant updated;
CommissionPoints forecastCommissionPoints;
CommissionPoints commissionPointsToInvoice;
CommissionPoint... | this.updated = updated;
this.invoicedCommissionPoints = invoicedCommissionPoints;
this.commissionPointsToInvoice = commissionPointsToInvoice;
this.forecastCommissionPoints = forecastCommissionPoints;
this.totalQtyInvolved = totalQtyInvolved;
this.currencyId = currencyId;
}
public CommissionTriggerDocument... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\sales\commissiontrigger\salesinvoicecandidate\SalesInvoiceCandidate.java | 2 |
请在Spring Boot框架中完成以下Java代码 | /* package */ I_C_BPartner retrieveLinkedBPartner(@CacheCtx final Properties ctx, final int adOrgId, @CacheTrx final String trxName)
{
final IQueryBuilder<I_C_BPartner> queryBuilder = Services.get(IQueryBL.class)
.createQueryBuilder(I_C_BPartner.class, ctx, trxName);
final ICompositeQueryFilter<I_C_BPartner> ... | @Override
@Deprecated
public org.compiere.model.I_AD_User retrieveUserInChargeOrNull(final Properties ctx, final int orgId, final String trxName)
{
final IBPartnerDAO bPartnerPA = Services.get(IBPartnerDAO.class);
org.compiere.model.I_AD_User defaultContact;
try
{
final I_C_BPartner orgBPartner = bPartner... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\BPartnerOrgBL.java | 2 |
请完成以下Java代码 | protected static Map<String, Map<String, Object>> buildActivitiesLocalVariablesMap(List<ActivityMigrationMapping> activityMigrationMappings) {
Map<String, Map<String, Object>> variablesMap = new HashMap<>();
activityMigrationMappings.forEach(mapping -> {
mapping.getToActivityIds().forEach(a... | return enableActivityMappings;
}
@Override
public Map<String, Map<String, Object>> getActivitiesLocalVariables() {
return activitiesLocalVariables;
}
public void setProcessInstanceVariables(Map<String, Object> processInstanceVariables) {
this.processInstanceVariables = processInsta... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\migration\ProcessInstanceMigrationDocumentImpl.java | 1 |
请完成以下Java代码 | public RestartProcessInstanceBuilder processInstanceIds(List<String> processInstanceIds) {
this.processInstanceIds.addAll(processInstanceIds);
return this;
}
@Override
public RestartProcessInstanceBuilder initialSetOfVariables() {
this.initialVariables = true;
return this;
}
public boolean i... | public boolean isSkipCustomListeners() {
return skipCustomListeners;
}
public boolean isSkipIoMappings() {
return skipIoMappings;
}
@Override
public RestartProcessInstanceBuilder withoutBusinessKey() {
withoutBusinessKey = true;
return this;
}
public boolean isWithoutBusinessKey() {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\RestartProcessInstanceBuilderImpl.java | 1 |
请完成以下Java代码 | public void setC_PO_OrderLine_Alloc_ID (final int C_PO_OrderLine_Alloc_ID)
{
if (C_PO_OrderLine_Alloc_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_PO_OrderLine_Alloc_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_PO_OrderLine_Alloc_ID, C_PO_OrderLine_Alloc_ID);
}
@Override
public int getC_PO_OrderLine_Alloc_... | @Override
public int getC_PO_OrderLine_ID()
{
return get_ValueAsInt(COLUMNNAME_C_PO_OrderLine_ID);
}
@Override
public org.compiere.model.I_C_OrderLine getC_SO_OrderLine()
{
return get_ValueAsPO(COLUMNNAME_C_SO_OrderLine_ID, org.compiere.model.I_C_OrderLine.class);
}
@Override
public void setC_SO_OrderLi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PO_OrderLine_Alloc.java | 1 |
请完成以下Spring Boot application配置 | # Deprecated Properties for Demonstration
#spring.resources.cache.period=31536000
#spring.resources.chain.compressed=false
#spring.resources.chain.html-application-cache=false
spring.web.resources.cache.period | =31536000
spring.web.resources.chain.compressed=false
banner.image.location="myBanner.txt" | repos\tutorials-master\spring-boot-modules\spring-boot-properties-migrator-demo\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public void setAllowEmptyNotBeforeClaim(boolean allowEmptyNotBeforeClaim) {
this.allowEmptyNotBeforeClaim = allowEmptyNotBeforeClaim;
}
@Override
public OAuth2TokenValidatorResult validate(Jwt jwt) {
Assert.notNull(jwt, "jwt cannot be null");
Instant expiry = jwt.getExpiresAt();
if (!this.allowEmptyExpiryCl... | private OAuth2TokenValidatorResult createOAuth2Error(String reason) {
this.logger.debug(reason);
return OAuth2TokenValidatorResult.failure(new OAuth2Error(OAuth2ErrorCodes.INVALID_TOKEN, reason,
"https://tools.ietf.org/html/rfc6750#section-3.1"));
}
/**
* Use this {@link Clock} with {@link Instant#now()} f... | repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtTimestampValidator.java | 1 |
请完成以下Java代码 | public String getIP_Address ()
{
return (String)get_Value(COLUMNNAME_IP_Address);
}
/** Set Transfer passive.
@param IsPassive
FTP passive transfer
*/
public void setIsPassive (boolean IsPassive)
{
set_Value (COLUMNNAME_IsPassive, Boolean.valueOf(IsPassive));
}
/** Get Transfer passive.
@return ... | @param URL
Full URL address - e.g. http://www.adempiere.org
*/
public void setURL (String URL)
{
set_Value (COLUMNNAME_URL, URL);
}
/** Get URL.
@return Full URL address - e.g. http://www.adempiere.org
*/
public String getURL ()
{
return (String)get_Value(COLUMNNAME_URL);
}
/** Set Registered ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Media_Server.java | 1 |
请完成以下Java代码 | public int getPA_ReportColumnSet_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PA_ReportColumnSet_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_PA_ReportCube getPA_ReportCube() throws RuntimeException
{
return (I_PA_ReportCube)MTable.get(getCtx(), I_PA_ReportCube.Table_Name)
... | public void setPA_ReportLineSet_ID (int PA_ReportLineSet_ID)
{
if (PA_ReportLineSet_ID < 1)
set_Value (COLUMNNAME_PA_ReportLineSet_ID, null);
else
set_Value (COLUMNNAME_PA_ReportLineSet_ID, Integer.valueOf(PA_ReportLineSet_ID));
}
/** Get Report Line Set.
@return Report Line Set */
public int getPA... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Report.java | 1 |
请完成以下Java代码 | protected boolean isCompensationEventSubprocess(ActivityImpl activity) {
return activity.isCompensationHandler() && activity.isSubProcessScope() && activity.isTriggeredByEvent();
}
protected void createCompensateEventSubscription(ActivityExecution execution, ActivityImpl compensationHandler) {
// the compe... | }
}
@Override
public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception {
if(SIGNAL_COMPENSATION_DONE.equals(signalName)) {
signalCompensationDone(execution);
} else {
super.signal(execution, signalName, signalData);
}
}
protected void sig... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\AbstractBpmnActivityBehavior.java | 1 |
请完成以下Java代码 | public void setCamundaDueDate(String camundaDueDate) {
camundaDueDateAttribute.setValue(this, camundaDueDate);
}
public String getCamundaFollowUpDate() {
return camundaFollowUpDateAttribute.getValue(this);
}
public void setCamundaFollowUpDate(String camundaFollowUpDate) {
camundaFollowUpDateAttrib... | .namespace(CAMUNDA_NS)
.build();
camundaFollowUpDateAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_FOLLOW_UP_DATE)
.namespace(CAMUNDA_NS)
.build();
camundaFormKeyAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_FORM_KEY)
.namespace(CAMUNDA_NS)
.build();
c... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\HumanTaskImpl.java | 1 |
请完成以下Java代码 | public static InitialDirContext creatDirectoryContext(LDAPConfiguration ldapConfigurator) {
return createDirectoryContext(ldapConfigurator, ldapConfigurator.getUser(), ldapConfigurator.getPassword());
}
public static InitialDirContext createDirectoryContext(LDAPConfiguration ldapConfigurator, String pr... | try {
context = new InitialDirContext(properties);
} catch (NamingException e) {
LOGGER.warn("Could not create InitialDirContext for LDAP connection: {}", e.getMessage());
throw new FlowableException("Could not create InitialDirContext for LDAP connection: " + e.getMessage(),... | repos\flowable-engine-main\modules\flowable-ldap\src\main\java\org\flowable\ldap\LDAPConnectionUtil.java | 1 |
请完成以下Java代码 | public boolean reActivateIt()
{
throw new UnsupportedOperationException();
// ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_REACTIVATE);
// ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_REACTIVATE);
// return true;
}
@Override
public String g... | public int getDoc_User_ID()
{
return getUpdatedBy();
}
/**
* Get Document Currency
*
* @return C_Currency_ID
*/
@Override
public int getC_Currency_ID()
{
// MPriceList pl = MPriceList.get(getCtx(), getM_PriceList_ID());
// return pl.getC_Currency_ID();
return 0;
}
public boolean isComplete()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MInventory.java | 1 |
请完成以下Java代码 | public static void error (final int WindowNo, final Container c, final String AD_Message)
{
final String msg = null;
error(WindowNo, c, AD_Message, msg);
}
/**************************************************************************
* Ask Question with question icon and (OK) (Cancel) buttons
* @param Windo... | * Beep
*/
public static void beep()
{
Toolkit.getDefaultToolkit().beep();
} // beep
// metas: begin
public static void error (int WindowNo, Container c, Throwable ex)
{
String adMessage = "Error";
String msg = ex.getLocalizedMessage();
log.warn(msg, ex);
error(WindowNo, c, adMessage, msg);
}
// metas... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ADialog.java | 1 |
请完成以下Java代码 | public class SetVariableAsyncCmd extends AbstractSetVariableAsyncCmd implements Command<Void> {
protected String caseInstanceId;
protected String variableName;
protected Object variableValue;
public SetVariableAsyncCmd(String caseInstanceId, String variableName, Object variableValue) {
... | CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);
CaseInstanceEntity caseInstanceEntity = cmmnEngineConfiguration.getCaseInstanceEntityManager().findById(caseInstanceId);
if (caseInstanceEntity == null) {
throw new FlowableObject... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\SetVariableAsyncCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BookDTO bookDTO = (BookDTO) o;
if (bookDTO.getId() == null || getId() == null) {
return false;
}
... | return Objects.hashCode(getId());
}
@Override
public String toString() {
return "BookDTO{" +
"id=" + getId() +
", title='" + getTitle() + "'" +
", author='" + getAuthor() + "'" +
", published='" + getPublished() + "'" +
", quantity=" + get... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\service\dto\BookDTO.java | 2 |
请完成以下Java代码 | public int getM_ProductPrice_ID()
{
return get_ValueAsInt(COLUMNNAME_M_ProductPrice_ID);
}
@Override
public void setMatchSeqNo (final int MatchSeqNo)
{
set_Value (COLUMNNAME_MatchSeqNo, MatchSeqNo);
}
@Override
public int getMatchSeqNo()
{
return get_ValueAsInt(COLUMNNAME_MatchSeqNo);
}
@Override
... | @Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
/**
* UseScalePrice AD_Reference_ID=541376
* Reference name: UseScalePrice
*/
public static final int USESCALEPRICE_AD_Reference_I... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ProductPrice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ExternalIdentifierFormat
{
@NonNull
public static String formatExternalId(@NonNull final String externalId)
{
return CommonAlbertaConstants.EXTERNAL_IDENTIFIER_PREFIX + "-" + CommonAlbertaConstants.ALBERTA_EXTERNAL_REFERENCE_SYSTEM + "-" + externalId;
}
@NonNull
public static String formatMainShip... | {
return CommonAlbertaConstants.EXTERNAL_IDENTIFIER_PREFIX + "-" + CommonAlbertaConstants.ALBERTA_EXTERNAL_REFERENCE_SYSTEM + "-" + GetPatientsRouteConstants.BILLING_ADDR_PREFIX + externalId;
}
@NonNull
public static String formatDeliveryAddressExternalId(@NonNull final String externalId)
{
return CommonAlbert... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\common\ExternalIdentifierFormat.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable SslBundle getSslBundle() {
return sslBundle;
}
@Override
public @Nullable String getSecurityProtocol() {
return securityProtocol;
}
};
}
/**
* Returns the list of bootstrap servers.
* @return the list of bootstrap servers
*/
List<String> getBootstrapServers... | * Returns the SSL bundle.
* @return the SSL bundle
*/
default @Nullable SslBundle getSslBundle() {
return null;
}
/**
* Returns the security protocol.
* @return the security protocol
*/
default @Nullable String getSecurityProtocol() {
return null;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-kafka\src\main\java\org\springframework\boot\kafka\autoconfigure\KafkaConnectionDetails.java | 2 |
请完成以下Java代码 | public void setEDI_ExportStatus (final @Nullable String EDI_ExportStatus)
{
set_ValueNoCheck (COLUMNNAME_EDI_ExportStatus, EDI_ExportStatus);
}
@Override
public String getEDI_ExportStatus()
{
return get_ValueAsString(COLUMNNAME_EDI_ExportStatus);
}
@Override
public void setEMailCount (final int EMailCoun... | public String getPOReference()
{
return get_ValueAsString(COLUMNNAME_POReference);
}
@Override
public void setPrintCount (final int PrintCount)
{
throw new IllegalArgumentException ("PrintCount is virtual column"); }
@Override
public int getPrintCount()
{
return get_ValueAsInt(COLUMNNAME_PrintCount);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java-gen\de\metas\document\archive\model\X_C_Doc_Outbound_Log.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Map<String, String> extractTokenKeys(Map<?, ?> response) {
Map<String, String> tokenKeys = new HashMap<>();
List<?> keys = (List<?>) response.get("keys");
Assert.state(keys != null, "'keys' must not be null");
for (Object key : keys) {
Map<?, ?> tokenKey = (Map<?, ?>) key;
tokenKeys.put((String) t... | if (this.uaaUrl == null) {
try {
Map<?, ?> response = this.restTemplate.getForObject(this.cloudControllerUrl + "/info", Map.class);
Assert.state(response != null, "'response' must not be null");
String tokenEndpoint = (String) response.get("token_endpoint");
Assert.state(tokenEndpoint != null, "'toke... | repos\spring-boot-4.0.1\module\spring-boot-cloudfoundry\src\main\java\org\springframework\boot\cloudfoundry\autoconfigure\actuate\endpoint\servlet\SecurityService.java | 2 |
请完成以下Java代码 | public void setCostAmountInvoiced(@NonNull final Money invoicedAmt, @NonNull final CurrencyPrecision precision)
{
final CurrencyId currencyId = invoicedAmt.getCurrencyId();
final Money totalCostAmountInOut = getCostAmountInOut();
final Money totalInvoicedAmtDiff = invoicedAmt.subtract(totalCostAmountInOut);
if... | line.setCostAmountInvoiced(lineCostAmountInOut.add(lineInvoicedAmtDiff));
totalInvoicedAmtDiffDistributed = totalInvoicedAmtDiffDistributed.add(lineInvoicedAmtDiff);
}
}
private Money getCostAmountInOut()
{
return lines.stream().map(CreateMatchInvoicePlanLine::getCostAmountInOut).reduce(Money::add)
.orE... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\invoice\CreateMatchInvoicePlan.java | 1 |
请完成以下Java代码 | public void resetQtyToOrder(I_PMM_PurchaseCandidate candidate)
{
candidate.setQtyToOrder(BigDecimal.ZERO);
candidate.setQtyToOrder_TU(BigDecimal.ZERO);
}
@Override
public IPMMPricingAware asPMMPricingAware(final I_PMM_PurchaseCandidate candidate)
{
return PMMPricingAware_PurchaseCandidate.of(candidate);
}
... | }
@Override
public int getM_HU_PI_Item_Product_Effective_ID(final I_PMM_PurchaseCandidate candidate)
{
final int hupipOverrideID = candidate.getM_HU_PI_Item_Product_Override_ID();
if (hupipOverrideID > 0)
{
// return M_HU_PI_Item_Product_Override if set
return hupipOverrideID;
}
// return M_HU_PI... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\PMMPurchaseCandidateBL.java | 1 |
请完成以下Java代码 | public class Task {
public static final String PATH = "tasks";
private String title;
private String description;
private String status;
private Date dueDate;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
... | public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
} | repos\tutorials-master\gcp-firebase\src\main\java\com\baeldung\gcp\firebase\firestore\Task.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ZonedDateTime getDateStartSchedule(@NonNull final I_PP_Order ppOrder)
{
return InstantAndOrgId.ofTimestamp(ppOrder.getDateStartSchedule(), ppOrder.getAD_Org_ID()).toZonedDateTime(orgDAO::getTimeZone);
}
public PPOrderQuantities getQuantities(@NonNull final I_PP_Order order) {return ppOrderBOMBL.getQuantiti... | return LocatorInfo.builder()
.id(locatorId)
.caption(caption)
.qrCode(LocatorQRCode.builder()
.locatorId(locatorId)
.caption(caption)
.build())
.build();
})
.collect(ImmutableList.toImmutableList());
return ValidateLocatorInfo.ofSourceLocatorList(sourceL... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\ManufacturingJobLoaderAndSaverSupportingServices.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void setCatchWeightForReceivedHUs()
{
if (catchWeight == null)
{
return;
}
if (receivedHUs.isEmpty())
{
//shouldn't happen
throw new AdempiereException("No HUs have been received!");
}
final PackedHUWeightNetUpdater weightUpdater = new PackedHUWeightNetUpdater(uomConversionBL,
hand... | {
return loadingAndSavingSupportServices.getQuantities(ppOrderBomLine).getQtyIssuedOrReceived().negate();
}
return loadingAndSavingSupportServices.getQuantities(getPPOrder()).getQtyReceived();
}
private boolean isCoProduct()
{
return getCOProductLine() != null;
}
private void setQRCodeAttribute(@NonNul... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\receive\ReceiveGoodsCommand.java | 2 |
请在Spring Boot框架中完成以下Java代码 | final class UserQueryField implements IUserQueryField
{
public static final UserQueryField cast(final IUserQueryField userQueryField)
{
return (UserQueryField)userQueryField;
}
private final String columnName;
private final ITranslatableString displayName;
private final DocumentFieldWidgetType widgetType;
pri... | return null; // shall not be needed
}
@Override
public String getValueDisplay(final Object value)
{
return null; // not needed
}
@Override
public Object convertValueToFieldType(final Object valueObj)
{
return valueObj;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\userQuery\UserQueryField.java | 2 |
请完成以下Java代码 | public static MainRowBucketId createInstanceForCockpitRecord(
@NonNull final I_MD_Cockpit dataRecord)
{
return new MainRowBucketId(
ProductId.ofRepoId(dataRecord.getM_Product_ID()),
TimeUtil.asLocalDate(dataRecord.getDateGeneral()));
}
public static MainRowBucketId createInstanceForStockRecord(
@Non... | }
@NonNull
public static MainRowBucketId createInstanceForQuantitiesRecord(
@NonNull final ProductWithDemandSupply qtyRecord,
@NonNull final LocalDate date)
{
return new MainRowBucketId(qtyRecord.getProductId(), date);
}
public static MainRowBucketId createPlainInstance(@NonNull final ProductId productId... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\rowfactory\MainRowBucketId.java | 1 |
请完成以下Java代码 | public class SalesDepartment implements Department {
private Integer id;
private String name;
public SalesDepartment(Integer id, String name) {
this.id = id;
this.name = name;
}
public void printDepartmentName() {
LOG.info(getClass().getSimpleName());
}
public Int... | return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\patterns-modules\design-patterns-structural-2\src\main\java\com\baeldung\composite\SalesDepartment.java | 1 |
请完成以下Java代码 | public int resolve(final GridTabMaxRows maxQueryRecords)
{
// Case: we were asked to use the default
if (maxQueryRecords != null && maxQueryRecords.isDefault())
{
return getMaxQueryRecords();
}
// Case: we were asked to not enforce at all
else if (maxQueryRecords == null || maxQueryRecords.isNoRestricti... | }
private IUserRolePermissions getUserRolePermissions()
{
if (userRolePermissions != null)
{
return userRolePermissions;
}
return Env.getUserRolePermissions();
}
public Builder setAD_Tab(final GridTab gridTab)
{
this.gridTab = gridTab;
return this;
}
public Builder setMaxQueryRec... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\GridTabMaxRowsRestrictionChecker.java | 1 |
请完成以下Java代码 | public void setDR_Account (final @Nullable java.lang.String DR_Account)
{
set_Value (COLUMNNAME_DR_Account, DR_Account);
}
@Override
public java.lang.String getDR_Account()
{
return get_ValueAsString(COLUMNNAME_DR_Account);
}
@Override
public void setDueDate (final @Nullable java.sql.Timestamp DueDate)
... | @Override
public void setPostingType (final @Nullable java.lang.String PostingType)
{
set_ValueNoCheck (COLUMNNAME_PostingType, PostingType);
}
@Override
public java.lang.String getPostingType()
{
return get_ValueAsString(COLUMNNAME_PostingType);
}
@Override
public void setTaxAmtSource (final @Nullable ... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java-gen\de\metas\datev\model\X_DATEV_ExportLine.java | 1 |
请完成以下Java代码 | public class ProcessDefinitionCacheEntry implements Serializable {
private static final long serialVersionUID = 6833801933658529070L;
protected ProcessDefinition processDefinition;
protected BpmnModel bpmnModel;
protected Process process;
public ProcessDefinitionCacheEntry(ProcessDefinition proce... | }
public BpmnModel getBpmnModel() {
return bpmnModel;
}
public void setBpmnModel(BpmnModel bpmnModel) {
this.bpmnModel = bpmnModel;
}
public Process getProcess() {
return process;
}
public void setProcess(Process process) {
this.process = process;
}
} | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\deploy\ProcessDefinitionCacheEntry.java | 1 |
请完成以下Java代码 | public int getM_Attribute_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Attribute_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_M_PropertiesConfig getM_PropertiesConfig() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_PropertiesConfig... | /** Get Properties Configuration Line.
@return Properties Configuration Line */
@Override
public int getM_PropertiesConfig_Line_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_PropertiesConfig_Line_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumer... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PropertiesConfig_Line.java | 1 |
请完成以下Java代码 | public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState,
Map<String, ?> options) {
this.subject = subject;
this.callbackHandler = callbackHandler;
this.sharedState = sharedState;
this.options = options;
}
@Ov... | @Override
public boolean commit() throws LoginException {
if (!loginSucceeded) {
return false;
}
userPrincipal = new UserPrincipal(username);
subject.getPrincipals().add(userPrincipal);
return true;
}
@Override
public boolean abort() throws LoginExcep... | repos\tutorials-master\core-java-modules\core-java-security-2\src\main\java\com\baeldung\jaas\loginmodule\InMemoryLoginModule.java | 1 |
请完成以下Java代码 | public boolean isRequired() {
return isRequired;
}
/**
*/
public void setRequired(boolean required) {
this.isRequired = required;
}
/**
* @param namespaceUri the namespaceUri to set
*/
public void setNamespaceUri(String namespaceUri) {
this.namespaceUri = namespaceUri;
}
/**
*... | if (namespaceUri == null) {
modelElement.removeAttribute(attributeName);
}
else {
modelElement.removeAttributeNs(namespaceUri, attributeName);
}
}
public void unlinkReference(ModelElementInstance modelElement, Object referenceIdentifier) {
if (!incomingReferences.isEmpty()) {
for ... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\attribute\AttributeImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class AbstractBuildableEngineConfiguration<E extends Engine> extends AbstractEngineConfiguration {
protected boolean runPostEngineBuildConsumer = true;
protected Consumer<E> postEngineBuildConsumer;
public E buildEngine() {
init();
initPostEngineBuildConsumer();
E e... | public boolean isRunPostEngineBuildConsumer() {
return runPostEngineBuildConsumer;
}
public void setRunPostEngineBuildConsumer(boolean runPostEngineBuildConsumer) {
this.runPostEngineBuildConsumer = runPostEngineBuildConsumer;
}
public Consumer<E> getPostEngineBuildConsumer() {
... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\AbstractBuildableEngineConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ItemWriter<App> writer(DruidDataSource dataSource) {
JdbcBatchItemWriter<App> writer = new JdbcBatchItemWriter<>();
//我们使用JDBC批处理的JdbcBatchItemWriter来写数据到数据库
writer.setItemSqlParameterSourceProvider(new BeanPropertyItemSqlParameterSourceProvider<>());
String sql = "insert into z_... | * @return
*/
@Bean(name = "zappStep1")
public Step zappStep1(StepBuilderFactory stepBuilderFactory,
@Qualifier("appReader") ItemReader<App> reader,
@Qualifier("appWriter") ItemWriter<App> writer,
@Qualifier("appProcessor") ItemPr... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\zapp\AppConfig.java | 2 |
请完成以下Java代码 | public int getC_Invoice_Candidate_Assigned_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_Candidate_Assigned_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set C_Invoice_Candidate_Assignment.
@param C_Invoice_Candidate_Assignment_ID C_Invoice_Candidate_Assignment */
@Overri... | @return Vertrag-Rechnungskandidat */
@Override
public int getC_Invoice_Candidate_Term_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_Candidate_Term_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Zugeordnete Menge wird in Summe einbez..
@param IsAssignedQuantityIncluded... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Invoice_Candidate_Assignment.java | 1 |
请完成以下Java代码 | public static PrivateKey readPrivateKey(String fileContent, String passStr) {
if (StringUtils.isNotEmpty(fileContent)) {
StringReader reader = new StringReader(fileContent);
return readPrivateKey(reader, passStr);
}
return null;
}
@SneakyThrows
public static ... | break;
} else if (object instanceof PEMKeyPair) {
privateKey = keyConverter.getKeyPair((PEMKeyPair) object).getPrivate();
break;
} else if (object instanceof PrivateKeyInfo) {
privateKey = keyConverter.getPrivateKey((PrivateKeyI... | repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\SslUtil.java | 1 |
请完成以下Java代码 | public void documentBuilderFactoryConfiguration(String property, String value) {
logDebug("003", "DocumentBuilderFactory configuration '{}' '{}'", property, value);
}
public void parsingInput() {
logDebug("004", "Parsing input into DOM document.");
}
public DataFormatException unableToCreateParser(Exc... | return new DataFormatException(
exceptionMessage("010", "Cannot deserialize '{}...' to java class '{}'", node.toString(), canonicalClassName), cause);
}
public DataFormatException unableToCreateMarshaller(Throwable cause) {
return new DataFormatException(exceptionMessage("011", "Cannot create marshaller"... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\format\xml\DomXmlLogger.java | 1 |
请完成以下Java代码 | public void registerDependsOnColumnnames(final String registrationKey, final String... columnNames)
{
dependsOnColumnNames.put(registrationKey, Arrays.asList(columnNames));
}
@Override
public List<String> getDependsOnColumnNames(final String registrationKey)
{
return dependsOnColumnNames.get(registrationKey);... | }
@Override
public <T> List<Object> getValuesForModel(final String registrationKey, final T model)
{
final CompositeAggregationKeyValueHandler compositeKeyValueHandler = getCompositeKeyValueHandler(registrationKey);
return compositeKeyValueHandler.getValues(model);
}
@Override
public void clearHandlers(fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\agg\key\impl\AggregationKeyRegistry.java | 1 |
请完成以下Java代码 | void open() throws IOException {
ftp = new FTPClient();
ftp.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
ftp.connect(server, port);
int reply = ftp.getReplyCode();
if (!FTPReply.isPositiveCompletion(reply)) {
ftp.disconnect();
... | return Arrays.stream(files)
.map(FTPFile::getName)
.collect(Collectors.toList());
}
void putFileToPath(File file, String path) throws IOException {
ftp.storeFile(path, new FileInputStream(file));
}
void downloadFile(String source, String destination) throws IOEx... | repos\tutorials-master\libraries-apache-commons-2\src\main\java\com\baeldung\commons\ftp\FtpClient.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ReceiverFromMetasfresh
{
private final ReceiverFromMetasfreshHandler handler;
private final RabbitMQAuditService auditService;
public ReceiverFromMetasfresh(
@NonNull final ReceiverFromMetasfreshHandler handler,
final RabbitMQAuditService auditService)
{
this.handler = handler;
this.auditSer... | handler.handlePutBPartnersRequest((PutBPartnersRequest)event);
}
else if (event instanceof PutProductsRequest)
{
handler.handlePutProductsRequest((PutProductsRequest)event);
}
else if (event instanceof PutRfQsRequest)
{
handler.handlePutRfQsRequest((PutRfQsRequest)event);
}
else if (event instance... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\rabbitmq\ReceiverFromMetasfresh.java | 2 |
请完成以下Java代码 | public String toString()
{
StringBuilder sb = new StringBuilder ("X_M_PropertiesConfig[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Properties Configuration.
@param M_PropertiesConfig_ID Properties Configuration */
@Override
public void setM_PropertiesConfig_ID (... | @Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Suchschlüssel.
@param Value
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PropertiesConfig.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static class MovementLineCostAmounts
{
AggregatedCostAmount outboundCosts;
AggregatedCostAmount inboundCosts;
}
public final MoveCostsResult getCreateCosts(@NonNull final AcctSchema as)
{
if (isReversalLine())
{
final AggregatedCostAmount outboundCosts = services.createReversalCostDetails(
... | .build();
}
else
{
return services.moveCosts(MoveCostsRequest.builder()
.acctSchemaId(as.getId())
.clientId(getClientId())
.date(getDateAcctAsInstant())
// .costElement(null) // all cost elements
.productId(getProductId())
.attributeSetInstanceId(getAttributeSetInstanceId())
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_Movement.java | 2 |
请完成以下Java代码 | public boolean shouldSelectCell(final EventObject e)
{
return true;
}
@Override
public Object getCellEditorValue()
{
final CEditor editor = getEditor();
if (editor == null)
{
return null;
}
return editor.getValue();
}
public Object getCellEditorValueOld()
{
return valueOld;
}
public boole... | {
return getCellEditorValue() == null;
}
@Override
public boolean stopCellEditing()
{
final boolean stopped = super.stopCellEditing();
if (stopped)
{
valueOld = null; // reset old value
}
return stopped;
}
@Override
public void cancelCellEditing()
{
fireEditingCanceled();
valueOld = null... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindCellEditor.java | 1 |
请完成以下Java代码 | private UserRequestBuilder newUserRequest(@NonNull final Mailbox mailbox, @NonNull final ILogger logger)
{
final String fromEmailId = mailbox.getEmail().getAsString();
return newClient(mailbox, logger).users(fromEmailId);
}
private GraphServiceClient<Request> newClient(@NonNull final Mailbox mailbox, @NonNull f... | case ERROR:
LogManager.setLoggerLevel(logger, Level.WARN);
break;
case DEBUG:
default:
LogManager.setLoggerLevel(logger, Level.DEBUG);
break;
}
}
@Override
public @NonNull LoggerLevel getLoggingLevel()
{
final Level level = LogManager.getLoggerLevel(logger);
if (level == nu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\sender\MicrosoftGraphMailSender.java | 1 |
请完成以下Java代码 | public LocalDate getDocumentDate()
{
return TimeUtil.asLocalDate(getDateOrdered());
}
/**
* Get Process Message
*
* @return clear text error message
*/
@Override
public String getProcessMsg()
{
return m_processMsg;
} // getProcessMsg
/**
* Get Document Owner (Responsible)
*/
@Override
pub... | */
@Override
public BigDecimal getApprovalAmt()
{
return getGrandTotal();
} // getApprovalAmt
/**
* Document Status is Complete or Closed
*
* @return true if CO, CL or RE
*/
public boolean isComplete()
{
final DocStatus docStatus = DocStatus.ofCode(getDocStatus());
return docStatus.isCompletedO... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MOrder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class SqlDateTypeAdapter extends TypeAdapter<java.sql.Date>
{
private DateFormat dateFormat;
public SqlDateTypeAdapter()
{
}
public SqlDateTypeAdapter(DateFormat dateFormat)
{
this.dateFormat = dateFormat;
}
public void setFormat(DateFormat dateFormat)
{
this.dateFormat = date... | value = ISO8601Utils.format(date, true);
}
out.value(value);
}
}
@Override
public Date read(JsonReader in) throws IOException
{
try
{
switch (in.peek())
{
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
try
{
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\invoker\JSON.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private synchronized void preDestroyGatewayProperties(ConfigChangeEvent changeEvent) {
logger.info("Pre Destroy GatewayProperties!");
// 判断 `spring.cloud.gateway.routes` 配置项,是否被全部删除。如果是,则置空 GatewayProperties 的 `routes` 属性
final boolean needClearRoutes = this.checkNeedClear(changeEvent, ID_PATTER... | * @param existSize
* @return boolean
* @author ksewen
* @date 2019/5/23 2:18 PM
*/
// 判断是否清除的标准,是通过指定配置项被删除的数量,是否和内存中的该配置项的数量一样。如果一样,说明被清空了
private boolean checkNeedClear(ConfigChangeEvent changeEvent, String pattern, int existSize) {
return changeEvent.changedKeys().stream().filter(... | repos\SpringBoot-Labs-master\labx-08-spring-cloud-gateway\labx-08-sc-gateway-demo03-config-apollo\src\main\java\cn\iocoder\springcloud\labx08\gatewaydemo\GatewayPropertiesRefresher.java | 2 |
请完成以下Java代码 | private void pushUp(List<T> h, int i) {
if (i != 1) {
if (isEvenLevel(i)) {
if (h.get(i - 1).compareTo(h.get(getParentIndex(i) - 1)) < 0) {
pushUpMin(h, i);
} else {
swap(i - 1, getParentIndex(i) - 1, h);
i =... | public T removeMin() {
T min = min();
if (min != null) {
if (indicator == 2) {
array.remove(indicator--);
return min;
}
array.set(0, array.get(--indicator - 1));
array.remove(indicator - 1);
pushDown(array, 1);
... | repos\tutorials-master\data-structures-2\src\main\java\com\baeldung\minmaxheap\MinMaxHeap.java | 1 |
请完成以下Java代码 | class MyHelperClass {
public double discount;
public MyHelperClass(double discount) {
if (discount > 0 && discount < 1) {
this.discount = discount;
}
}
public double discountedPrice(double price) {
return price - (price * discount);
}
public static int getMax... | }
public static int getMinNumber(int[] numbers) {
if (numbers.length == 0) {
throw new IllegalArgumentException("Ensure array is not empty");
}
int min = numbers[0];
for (int i = 1; i < numbers.length; i++) {
if (numbers[i] < min) {
min = numb... | repos\tutorials-master\core-java-modules\core-java-8-2\src\main\java\com\baeldung\helpervsutilityclasses\MyHelperClass.java | 1 |
请完成以下Java代码 | public void setPartitionSize(final int PartitionSize)
{
set_Value(COLUMNNAME_PartitionSize, Integer.valueOf(PartitionSize));
}
/**
* Get Anz. zugeordneter Datensätze.
*
* @return Anz. zugeordneter Datensätze
*/
@Override
public int getPartitionSize()
{
final Integer ii = (Integer)get_Value(COLUMNNAM... | /**
* Get Ziel-DLM-Level.
*
* @return Ziel-DLM-Level
*/
@Override
public int getTarget_DLM_Level()
{
final Integer ii = (Integer)get_Value(COLUMNNAME_Target_DLM_Level);
if (ii == null)
{
return 0;
}
return ii.intValue();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition.java | 1 |
请完成以下Java代码 | public int getFactor() {
return factor;
}
public void setFactor(int factor) {
this.factor = factor;
}
public boolean isBasedOnPreviousValue() {
return basedOnPreviousValue;
}
public void setBasedOnPreviousValue(boolean basedOnPreviousValue) {
this.basedOnPreviousValue = basedOnPreviousValue;
... | public void validate() {
Assert.isTrue(randomFactor >= 0 && randomFactor <= 1,
"random factor must be between 0 and 1 (default 0.5)");
}
public JitterConfig() {
}
public JitterConfig(double randomFactor) {
this.randomFactor = randomFactor;
}
public double getRandomFactor() {
return randomFa... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RetryGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public String getEnquingPackageProcessorInternalName()
{
Check.errorIf(Check.isEmpty(enquingPackageProcessorInternalName, true),
UnsupportedOperationException.class,
"Queue {} has no EnqueuingProcessorInternalName. It was problably not intended for enqueuing, but for queue processing",
this);
return e... | return new WorkPackageBuilder(context, this, enquingPackageProcessorId);
}
@NonNull
public Set<QueuePackageProcessorId> getQueuePackageProcessorIds()
{
return packageProcessorIds;
}
@Override
public QueueProcessorId getQueueProcessorId()
{
return queueProcessorId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageQueue.java | 1 |
请完成以下Java代码 | private final List<AnnotatedTableAction> getTableActions()
{
final List<AnnotatedTableAction> tableActions = new ArrayList<>();
for (final MenuElement me : getSubElements())
{
if (!(me instanceof AbstractButton))
{
continue;
}
final AbstractButton button = (AbstractButton)me;
final Action ac... | private final void popupMenuWillBecomeVisible(final PopupMenuEvent e)
{
for (final AnnotatedTableAction tableAction : getTableActions())
{
tableAction.setTable(getTable());
tableAction.updateBeforeDisplaying();
}
}
private final void popupMenuWillBecomeInvisible(final PopupMenuEvent e)
{
// nothing a... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AnnotatedTablePopupMenu.java | 1 |
请完成以下Java代码 | public class CdiBusinessProcessEvent implements BusinessProcessEvent {
protected final String activityId;
protected final ProcessDefinition processDefinition;
protected final String transitionName;
protected final String processInstanceId;
protected final String executionId;
protected final Bus... | }
@Override
public String getExecutionId() {
return executionId;
}
@Override
public BusinessProcessEventType getType() {
return type;
}
@Override
public Date getTimeStamp() {
return timeStamp;
}
@Override
public String toString() {
return "... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\event\CdiBusinessProcessEvent.java | 1 |
请完成以下Java代码 | public void setM_HU_ID (final int M_HU_ID)
{
if (M_HU_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_HU_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_HU_ID, M_HU_ID);
}
@Override
public int getM_HU_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_ID);
}
@Override
public void setM_HU_Item_ID (final int M_H... | @Override
public int getM_HU_PackingMaterial_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_PackingMaterial_ID);
}
@Override
public de.metas.handlingunits.model.I_M_HU_PI_Item getM_HU_PI_Item()
{
return get_ValueAsPO(COLUMNNAME_M_HU_PI_Item_ID, de.metas.handlingunits.model.I_M_HU_PI_Item.class);
}
@Overrid... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Item.java | 1 |
请完成以下Java代码 | public EventDefinitionDeploymentHelper getEventDeploymentHelper() {
return eventDeploymentHelper;
}
public void setEventDeploymentHelper(EventDefinitionDeploymentHelper eventDeploymentHelper) {
this.eventDeploymentHelper = eventDeploymentHelper;
}
public ChannelDefinitionDeployment... | return cachingAndArtifactsManager;
}
public void setCachingAndArtifactsManager(CachingAndArtifactsManager manager) {
this.cachingAndArtifactsManager = manager;
}
public boolean isUsePrefixId() {
return usePrefixId;
}
public void setUsePrefixId(boolean usePrefixId) {
th... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\deployer\EventDefinitionDeployer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public SelfNameResolverFactory selfNameResolverFactory(final GrpcServerProperties properties) {
return new SelfNameResolverFactory(properties);
}
@ConditionalOnMissingBean
@Bean
GlobalServerInterceptorRegistry globalServerInterceptorRegistry(
final ApplicationContext applicationCont... | return builder -> builder.decompressorRegistry(registry);
}
@ConditionalOnMissingBean(GrpcServerConfigurer.class)
@Bean
public List<GrpcServerConfigurer> defaultServerConfigurers() {
return Collections.emptyList();
}
@ConditionalOnMissingBean
@ConditionalOnBean(GrpcServerFactory.cl... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerAutoConfiguration.java | 2 |
请完成以下Java代码 | public class MaxHeap<E> implements Iterable<E>
{
/**
* 优先队列
*/
private PriorityQueue<E> queue;
/**
* 堆的最大容量
*/
private int maxSize;
/**
* 构造最大堆
* @param maxSize 保留多少个元素
* @param comparator 比较器,生成最大堆使用o1-o2,生成最小堆使用o2-o1,并修改 e.compareTo(peek) 比较规则
*/
public... | return this;
}
/**
* 转为有序列表,自毁性操作
* @return
*/
public List<E> toList()
{
ArrayList<E> list = new ArrayList<E>(queue.size());
while (!queue.isEmpty())
{
list.add(0, queue.poll());
}
return list;
}
@Override
public Iterator<... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\algorithm\MaxHeap.java | 1 |
请完成以下Java代码 | protected List<Job> reconfigureJobs(List<Job> historyCleanupJobs, int degreeOfParallelism, int[][] minuteChunks) {
CommandContext commandContext = Context.getCommandContext();
JobManager jobManager = commandContext.getJobManager();
int maxRetries = HistoryCleanupHelper.getMaxRetries();
int size = Math.... | @SuppressWarnings("unchecked")
protected JobEntity createJob(int[] minuteChunk, int maxRetries) {
HistoryCleanupContext context = createCleanupContext(minuteChunk, maxRetries);
return HISTORY_CLEANUP_JOB_DECLARATION.createJobInstance(context);
}
protected HistoryCleanupContext createCleanupContext(int[] ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\HistoryCleanupCmd.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_M_PricingSystem[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set Beschreibung.
@param Description
Optionale kurze Beschreibung fuer den Eintrag
*/
public void setDescription (String Description)
{
... | /** Set Name.
@param Name
Alphanumerische Bezeichnung fuer diesen Eintrag
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumerische Bezeichnung fuer diesen Eintrag
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PricingSystem.java | 1 |
请完成以下Java代码 | public double getTotal() {
return NumberUtil.round(NumberUtil.mul(total, 100), 2).doubleValue();
}
public void setTotal(double total) {
this.total = total;
}
public double getSys() {
return NumberUtil.round(NumberUtil.mul(sys / total, 100), 2).doubleValue();
}
public v... | public void setUsed(double used) {
this.used = used;
}
public double getWait() {
return NumberUtil.round(NumberUtil.mul(wait / total, 100), 2).doubleValue();
}
public void setWait(double wait) {
this.wait = wait;
}
public double getFree() {
return NumberUtil.ro... | repos\spring-boot-demo-master\demo-websocket\src\main\java\com\xkcoding\websocket\model\server\Cpu.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Deposit extends PanacheEntity {
private String depositCode;
private String currency;
private String amount;
public static Deposit from(Row row) {
return new Deposit(row.getString("DEPOSITCODE"), row.getString("CURRENCY"), row.getString("AMOUNT"));
}
public Deposit() {
... | public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
} | repos\tutorials-master\quarkus-modules\quarkus-hibernate-reactive\src\main\java\com\baeldung\entity\Deposit.java | 2 |
请完成以下Java代码 | public HUMoveToDirectWarehouseService setDescription(final String description)
{
_description = description;
return this;
}
private String getDescription()
{
return _description;
}
public HUMoveToDirectWarehouseService setLoggable(@NonNull final ILoggable loggable)
{
this.loggable = loggable;
return ... | //
// Invalidate all documents which are about this HU.
if (documentsCollection != null)
{
try
{
documentsCollection.invalidateDocumentByRecordId(I_M_HU.Table_Name, huId.getRepoId());
}
catch (final Exception ex)
{
logger.warn("Failed invalidating documents for M_HU_ID={}. Ignored", huId, e... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\HUMoveToDirectWarehouseService.java | 1 |
请完成以下Java代码 | public void setIncluded_Val_Rule_ID (int Included_Val_Rule_ID)
{
if (Included_Val_Rule_ID < 1)
set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, Integer.valueOf(Included_Val_Rule_ID));
}
/** Get Included_Val_Rule_ID.
@return Validation ru... | /** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
public void setSeqNo (String SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
/** Get Reihenfolge.
@return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Val_Rule_Included.java | 1 |
请完成以下Java代码 | public void saveContext(SecurityContext context, HttpServletRequest request, HttpServletResponse response) {
for (SecurityContextRepository delegate : this.delegates) {
delegate.saveContext(context, request, response);
}
}
@Override
public boolean containsContext(HttpServletRequest request) {
for (Security... | this.next = next;
}
@Override
public SecurityContext get() {
SecurityContext securityContext = this.previous.get();
if (!this.previous.isGenerated()) {
return securityContext;
}
return this.next.get();
}
@Override
public boolean isGenerated() {
return this.previous.isGenerated() && this... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\context\DelegatingSecurityContextRepository.java | 1 |
请完成以下Java代码 | public void closeExistingScheds(@NonNull final I_C_Order orderRecord)
{
if (!isEligibleForShipmentSchedule(orderRecord))
{
return;
}
final ImmutableList<TableRecordReference> orderLineRecordRefs = orderDAO
.retrieveAllOrderLineIds(OrderId.ofRepoId(orderRecord.getC_Order_ID()))
.stream()
.map(Or... | {
if (!isEligibleForShipmentSchedule(order))
{
return;
}
final ImmutableSet<I_M_InOut> activeShipments = inOutBL.getNotVoidedNotReversedForOrderId(OrderId.ofRepoId(order.getC_Order_ID()));
if (!activeShipments.isEmpty())
{
throw new AdempiereException(
ERR_NoReactivationIfNotVoidedNotReversedSh... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\C_Order_ShipmentSchedule.java | 1 |
请完成以下Java代码 | public class PmsProductAttributeParam {
@NotEmpty
@ApiModelProperty("属性分类ID")
private Long productAttributeCategoryId;
@NotEmpty
@ApiModelProperty("属性名称")
private String name;
@FlagValidator({"0","1","2"})
@ApiModelProperty("属性选择类型:0->唯一;1->单选;2->多选")
private Integer selectType;
... | @FlagValidator({"0","1"})
private Integer filterType;
@ApiModelProperty("检索类型;0->不需要进行检索;1->关键字检索;2->范围检索")
@FlagValidator({"0","1","2"})
private Integer searchType;
@ApiModelProperty("相同属性商品是否关联;0->不关联;1->关联")
@FlagValidator({"0","1"})
private Integer relatedStatus;
@ApiModelProperty("是... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\dto\PmsProductAttributeParam.java | 1 |
请完成以下Java代码 | public String getOutboundHttpMethod()
{
return get_ValueAsString(COLUMNNAME_OutboundHttpMethod);
}
@Override
public void setPassword (final @Nullable String Password)
{
set_Value (COLUMNNAME_Password, Password);
}
@Override
public String getPassword()
{
return get_ValueAsString(COLUMNNAME_Password);
... | public static final String TYPE_TCP = "TCP";
@Override
public void setType (final String Type)
{
set_Value (COLUMNNAME_Type, Type);
}
@Override
public String getType()
{
return get_ValueAsString(COLUMNNAME_Type);
}
@Override
public void setValue (final String Value)
{
set_Value (COLUMNNAME_Value, Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Outbound_Endpoint.java | 1 |
请完成以下Java代码 | public void migrateDependentEntities() {
for (MigratingInstance migratingDependentInstance : dependentInstances) {
migratingDependentInstance.migrateState();
}
}
@Override
public boolean isDetached() {
return externalTask.getExecutionId() == null;
}
@Override
public void detachState() {
... | ScopeImpl targetActivity = migratingActivityInstance.getTargetScope();
ProcessDefinition targetProcessDefinition = (ProcessDefinition) targetActivity.getProcessDefinition();
externalTask.setActivityId(targetActivity.getId());
externalTask.setProcessDefinitionId(targetProcessDefinition.getId());
externa... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingExternalTaskInstance.java | 1 |
请完成以下Java代码 | public String getScheduleType() {
return scheduleType;
}
public void setScheduleType(String scheduleType) {
this.scheduleType = scheduleType;
}
public String getScheduleConf() {
return scheduleConf;
}
public void setScheduleConf(String scheduleConf) {
this.scheduleConf = scheduleConf;
}
public Strin... | }
public void setGlueRemark(String glueRemark) {
this.glueRemark = glueRemark;
}
public Date getGlueUpdatetime() {
return glueUpdatetime;
}
public void setGlueUpdatetime(Date glueUpdatetime) {
this.glueUpdatetime = glueUpdatetime;
}
public String getChildJobId() {
return childJobId;
}
public void ... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobInfo.java | 1 |
请完成以下Java代码 | private static void permutationsInternal(List<Integer> sequence, List<List<Integer>> results, int index) {
if (index == sequence.size() - 1) {
results.add(new ArrayList<>(sequence));
}
for (int i = index; i < sequence.size(); i++) {
swap(sequence, i, index);
... | combinationsInternal(inputSet, k, results, accumulator, index + 1);
accumulator.add(inputSet.get(index));
combinationsInternal(inputSet, k, results, accumulator, index + 1);
accumulator.remove(accumulator.size() - 1);
}
}
public static List<List<Character>> powerSet... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-5\src\main\java\com\baeldung\algorithms\combinatorics\Combinatorics.java | 1 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Arrays.hashCode(this.body);
result = prime * result + ((this.messageProperties == null) ? 0 : this.messageProperties.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
r... | if (getClass() != obj.getClass()) {
return false;
}
Message other = (Message) obj;
if (!Arrays.equals(this.body, other.body)) {
return false;
}
if (this.messageProperties == null) {
return other.messageProperties == null;
}
return this.messageProperties.equals(other.messageProperties);
}
} | repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\Message.java | 1 |
请完成以下Java代码 | public void iterateWithForLoop() {
for (int i = 0; i < countries.size(); i++) {
System.out.println(countries.get(i));
}
}
/**
* Iterate over a list using the enhanced for loop
*/
public void iterateWithEnhancedForLoop() {
for (String country : countries) {
... | */
public void iterateWithListIterator() {
ListIterator<String> listIterator = countries.listIterator();
while(listIterator.hasNext()) {
System.out.println(listIterator.next());
}
}
/**
* Iterate over a list using the Iterable.forEach() method
*/
public voi... | repos\tutorials-master\core-java-modules\core-java-collections-list\src\main\java\com\baeldung\list\WaysToIterate.java | 1 |
请完成以下Java代码 | public ComponentDescriptor saveComponent(TenantId tenantId, ComponentDescriptor component) {
componentValidator.validate(component, data -> TenantId.SYS_TENANT_ID);
Optional<ComponentDescriptor> result = componentDescriptorDao.saveIfNotExist(tenantId, component);
return result.orElseGet(() -> co... | @Override
public void deleteByClazz(TenantId tenantId, String clazz) {
Validator.validateString(clazz, "Incorrect clazz for delete request.");
componentDescriptorDao.deleteByClazz(tenantId, clazz);
}
@Override
public boolean validate(TenantId tenantId, ComponentDescriptor component, Jso... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\component\BaseComponentDescriptorService.java | 1 |
请完成以下Java代码 | private I_M_ProductPrice getProductPriceOrNull(final ProductId productId,
final I_M_PriceList_Version ctxPriceListVersion)
{
return ProductPrices.retrieveMainProductPriceOrNull(ctxPriceListVersion, productId);
}
private I_M_PriceList_Version getOrLoadPriceListVersion(
@NonNull final PriceListVersionId price... | }
private UomId getProductPriceUomId(final I_M_ProductPrice productPrice)
{
final UomId productPriceUomId = UomId.ofRepoIdOrNull(productPrice.getC_UOM_ID());
if (productPriceUomId != null)
{
return productPriceUomId;
}
final ProductId productId = ProductId.ofRepoId(productPrice.getM_Product_ID());
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\price_list_version\MainProductPriceRule.java | 1 |
请完成以下Java代码 | public int getC_Invoice_Cand_ToClear_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_Cand_ToClear_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Rechnungskanditad - Verrechnung.
@param C_Invoice_Clearing_Alloc_ID Rechnungskanditad - Verrechnung */
@Override
public void ... | else
set_ValueNoCheck (COLUMNNAME_C_Invoice_Clearing_Alloc_ID, Integer.valueOf(C_Invoice_Clearing_Alloc_ID));
}
/** Get Rechnungskanditad - Verrechnung.
@return Rechnungskanditad - Verrechnung */
@Override
public int getC_Invoice_Clearing_Alloc_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoi... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Invoice_Clearing_Alloc.java | 1 |
请完成以下Java代码 | public void export(JasperPrint jp, String fileName, HttpServletResponse response) throws JRException, IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Create a JRXlsExporter instance
JRXlsExporter exporter = new JRXlsExporter();
// Here we assign the parameters jp and baos to the ex... | // Specifies the response header
response.setHeader("Content-Disposition", "inline; filename=" + fileName);
// Make sure to set the correct content type
// Each format has its own content type
response.setContentType("application/vnd.ms-excel");
response.setContentLength(baos.size());
// Retrieve the outp... | repos\tutorials-master\spring-roo\src\main\java\com\baeldung\web\reports\JasperReportsXlsExporter.java | 1 |
请完成以下Java代码 | public String getDetail()
{
return detail;
}
public String getSenderName()
{
return senderName;
}
public static final class Builder
{
private String summary;
private String detail;
private String senderName;
private Builder()
{
super();
}
public NotificationItem build()
{
return new... | return this;
}
/**
* @param detail detail HTML text
*/
public Builder setDetail(String detail)
{
this.detail = detail;
return this;
}
public Builder setSenderName(String senderName)
{
this.senderName = senderName;
return this;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\notifications\NotificationItem.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.