instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public String getIncludeExpression() {
return includeExpression;
}
public void setIncludeExpression(String includeExpression) {
this.includeExpression = includeExpression;
}
public String getUrlExpression() {
return urlExpression;
}
public void setUrlExpression(String urlExpression) {
this.urlExpressio... | public List<FilterDefinition> getFilters() {
return filters;
}
public void setFilters(List<FilterDefinition> filters) {
this.filters = filters;
}
@Override
public String toString() {
return new ToStringCreator(this).append("enabled", enabled)
.append("routeIdPrefix", routeIdPrefix)
.append("includeEx... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\discovery\DiscoveryLocatorProperties.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @ResponseBody Company getCompanyById(@PathVariable final long Id) {
return companyMap.get(Id);
}
@RequestMapping(value = "/addCompany", method = RequestMethod.POST)
public String submit(@ModelAttribute("company") final Company company, final BindingResult result, final ModelMap model) {
... | @RequestMapping(value = "/companyEmployee/{company}/employeeData/{employee}", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Map<String, String>> getEmployeeDataFromCompany(@MatrixVariable(pathVar = "employee") final Map<String, String> matrixVars) {
return new ResponseEntity<>(matrixVa... | repos\tutorials-master\spring-web-modules\spring-mvc-java-2\src\main\java\com\baeldung\matrix\controller\CompanyController.java | 2 |
请完成以下Java代码 | public final class C_Order_MFGWarehouse_Report_RecordTextProvider implements IRecordTextProvider
{
public static final transient C_Order_MFGWarehouse_Report_RecordTextProvider instance = new C_Order_MFGWarehouse_Report_RecordTextProvider();
private static final String MSG_PrintingInfo_MFGWarehouse_Report = "de.metas... | // the archive must point to the C_Order_MFGWarehouse_Report table
if (archive.getAD_Table_ID() != InterfaceWrapperHelper.getTableId(I_C_Order_MFGWarehouse_Report.class))
{
return Optional.absent();
}
final I_C_Order_MFGWarehouse_Report mfgWarehouseReport = printingInfo.getC_Order_MFGWarehouse_Report();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\printing\spi\impl\C_Order_MFGWarehouse_Report_RecordTextProvider.java | 1 |
请完成以下Java代码 | public String getExpressionString()
{
return expressionBaseLang.getExpressionString();
}
@Override
public String getFormatedExpressionString()
{
return expressionBaseLang.getFormatedExpressionString();
}
@Override
public Set<CtxName> getParameters()
{
return parameters;
}
@Override
public String ev... | }
private static final OnVariableNotFound getOnVariableNotFoundForInternalParameter(final OnVariableNotFound onVariableNotFound)
{
switch (onVariableNotFound)
{
case Preserve:
// Preserve is not supported because we don't know which expression to pick if the deciding parameter is not determined
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\TranslatableParameterizedStringExpression.java | 1 |
请完成以下Java代码 | public void setNoInventoryCount (int NoInventoryCount)
{
set_Value (COLUMNNAME_NoInventoryCount, Integer.valueOf(NoInventoryCount));
}
/** Get Number of Inventory counts.
@return Frequency of inventory counts per year
*/
public int getNoInventoryCount ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_NoIn... | Integer ii = (Integer)get_Value(COLUMNNAME_NumberOfRuns);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PerpetualInv.java | 1 |
请完成以下Java代码 | public void onDeviceUpdate(TransportProtos.SessionInfoProto sessionInfo, Device device, Optional<DeviceProfile> deviceProfileOpt) {
this.handler.onDeviceUpdate(sessionInfo, device, deviceProfileOpt);
}
@Override
public void onToDeviceRpcRequest(UUID sessionId, ToDeviceRpcRequestMsg toDeviceRequest)... | public void onResourceUpdate(TransportProtos.ResourceUpdateMsg resourceUpdateMsgOpt) {
if (ResourceType.LWM2M_MODEL.name().equals(resourceUpdateMsgOpt.getResourceType())) {
this.handler.onResourceUpdate(resourceUpdateMsgOpt);
}
}
@Override
public void onResourceDelete(TransportP... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\LwM2mSessionMsgListener.java | 1 |
请完成以下Java代码 | public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set XY Separator.
@param XYSeparator | The separator between the X and Y function.
*/
public void setXYSeparator (String XYSeparator)
{
set_Value (COLUMNNAME_XYSeparator, XYSeparator);
}
/** Get XY Separator.
@return The separator between the X and Y function.
*/
public String getXYSeparator ()
{
return (String)get_Value(COLUMNNAME_XYSep... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_LabelPrinterFunction.java | 1 |
请完成以下Java代码 | public ModelElementType build() {
model.registerType(modelType, instanceType);
return modelType;
}
public ModelElementTypeBuilder abstractType() {
modelType.setAbstract(true);
return this;
}
public SequenceBuilder sequence() {
SequenceBuilderImpl builder = new SequenceBuilderImpl(modelType... | throw new ModelException("Type "+modelType+" is defined to extend "+extendedType+" but no such type is defined.");
} else {
modelType.setBaseType(extendedModelElementType);
extendedModelElementType.registerExtendingType(modelType);
}
}
}
public void performModelBuild(Model model) {... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\ModelElementTypeBuilderImpl.java | 1 |
请完成以下Java代码 | public String toString()
{
int l = -1;
for (String c : catalog)
{
l = Math.max(l, c.length());
}
final int w = 6;
final StringBuilder sb = new StringBuilder(10000);
printf(sb, "%*s\t%*s\t%*s\t%*s\t%*s%n".replace('*', Character.forDigit(w, 10)), "P... | printf(sb, ("%*.2f\t%*.2f\t%*.2f\t%*.2f\t%"+l+"s%n").replace('*', Character.forDigit(w, 10)),
average_precision * 100.,
average_recall * 100.,
average_f1 * 100.,
average_accuracy * 100.,
"avg.");
printf(sb, "data size = %d, speed = %.2f ... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\statistics\evaluations\FMeasure.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getCardNo() {
return cardNo;
}
public void setCardNo(String cardNo) {
this.cardNo = cardNo;
}
public String getMobileNo() {
return mobileNo;
}
public void setMobileNo(String mobileNo) {
this.mobileNo = mobileNo;
... | public void setCvn2(String cvn2) {
this.cvn2 = cvn2;
}
public String getExpDate() {
return expDate;
}
public void setExpDate(String expDate) {
this.expDate = expDate;
}
public String getIsDefault() {
return isDefault;
}
public void setIsDefault(String isDefault) {
this.isDefault = isDefault;
}
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\entity\RpUserQuickPayBankAccount.java | 2 |
请完成以下Java代码 | public String taskProcess() {
return readJson("classpath:org/jeecg/modules/demo/mock/json/task_process.json");
}
//-------------------------------------------------------------------------------------------
//author:lvdandan-----date:20190315---for:添加数据日志json----
/**
* 数据日志
*/
public String sysData... | }
//--update-end--author:wangshuai-----date:20201023---for:返回用户信息json数据----
/**
* 读取json格式文件
* @param jsonSrc
* @return
*/
private String readJson(String jsonSrc) {
String json = "";
try {
//File jsonFile = ResourceUtils.getFile(jsonSrc);
//json = FileUtils.re.readFileToString(jsonFile);
//换个写法,... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-module-demo\src\main\java\org\jeecg\modules\demo\mock\MockController.java | 1 |
请完成以下Java代码 | public class ErrorThrowingEventListener extends BaseDelegateEventListener {
protected String errorCode;
@Override
public void onEvent(ActivitiEvent event) {
if (isValidEvent(event)) {
onEventInternal(event);
}
}
protected void onEventInternal(ActivitiEvent event) {
... | "No execution context active and event is not related to an execution. No compensation event can be thrown."
);
}
try {
ErrorPropagation.propagateError(errorCode, execution);
} catch (Exception e) {
throw new ActivitiException("Error while propagating error-e... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\helper\ErrorThrowingEventListener.java | 1 |
请完成以下Java代码 | public void setC_BPartner_ID (final int C_BPartner_ID)
{
if (C_BPartner_ID < 1)
set_Value (COLUMNNAME_C_BPartner_ID, null);
else
set_Value (COLUMNNAME_C_BPartner_ID, C_BPartner_ID);
}
@Override
public int getC_BPartner_ID()
{
return get_ValueAsInt(COLUMNNAME_C_BPartner_ID);
}
@Override
public v... | }
@Override
public void setRecord_ID (final int Record_ID)
{
if (Record_ID < 0)
set_Value (COLUMNNAME_Record_ID, null);
else
set_Value (COLUMNNAME_Record_ID, Record_ID);
}
@Override
public int getRecord_ID()
{
return get_ValueAsInt(COLUMNNAME_Record_ID);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_RelatedRecord1.java | 1 |
请完成以下Java代码 | public void setChrgBr(ChargeBearerType1Code value) {
this.chrgBr = value;
}
/**
* Gets the value of the chrgsAcct property.
*
* @return
* possible object is
* {@link CashAccount16CHIdAndCurrency }
*
*/
public CashAccount16CHIdAndCurrency getChrgsAcct... | * <p>
* For example, to add a new item, do as follows:
* <pre>
* getCdtTrfTxInf().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CreditTransferTransactionInformation10CH }
*
*
*/
public List<Cred... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\PaymentInstructionInformation3CH.java | 1 |
请完成以下Java代码 | protected POInfo initPO(Properties ctx)
{
POInfo poi = POInfo.getPOInfo(ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer("X_M_PackagingTreeItemSched[")
.append(get_ID()).append("]");
return sb.toString();
}
/**
* Set Packaging Tree Item Sch... | if (ii == null)
return 0;
return ii.intValue();
}
@Override
public I_M_ShipmentSchedule getM_ShipmentSchedule() throws RuntimeException
{
return (I_M_ShipmentSchedule)MTable.get(getCtx(), I_M_ShipmentSchedule.Table_Name)
.getPO(getM_ShipmentSchedule_ID(), get_TrxName());
}
@Override
public int getM_... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItemSched.java | 1 |
请完成以下Java代码 | public boolean hasIgnoreCondition() {
return hasIgnoreRule() && (ignoreCondition.contains("#") || ignoreCondition.contains("$"));
}
public boolean hasDefaultCondition() {
return hasDefaultRule() && (defaultCondition.contains("#") || defaultCondition.contains("$"));
}
public String getDe... | @Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReactivationRule that = (ReactivationRule) o;
return Objects.equals(activateCondition, that.activateCondi... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\ReactivationRule.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_BoilerPlate_Ref[")
.append(get_ID()).append("]");
return sb.toString();
}
@Override
public de.metas.letters.model.I_AD_BoilerPlate getAD_BoilerPlate() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_AD_Boile... | set_ValueFromPO(COLUMNNAME_Ref_BoilerPlate_ID, de.metas.letters.model.I_AD_BoilerPlate.class, Ref_BoilerPlate);
}
/** Set Referenced template.
@param Ref_BoilerPlate_ID Referenced template */
@Override
public void setRef_BoilerPlate_ID (int Ref_BoilerPlate_ID)
{
if (Ref_BoilerPlate_ID < 1)
set_ValueNoCh... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\letters\model\X_AD_BoilerPlate_Ref.java | 1 |
请完成以下Java代码 | public static String encode(AnsiElement element) {
if (isEnabled()) {
return ENCODE_START + element + ENCODE_END;
}
return "";
}
/**
* Create a new ANSI string from the specified elements. Any {@link AnsiElement}s will
* be encoded as required.
* @param elements the elements to encode
* @return a st... | return ansiCapable;
}
return enabled == Enabled.ALWAYS;
}
private static boolean detectIfAnsiCapable() {
try {
if (Boolean.FALSE.equals(consoleAvailable)) {
return false;
}
if (consoleAvailable == null) {
Console console = System.console();
if (console == null) {
return false;
}
... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ansi\AnsiOutput.java | 1 |
请完成以下Java代码 | public List<PermissionCheck> getProcessInstancePermissionChecks() {
return processInstancePermissionChecks;
}
public void setProcessInstancePermissionChecks(List<PermissionCheck> processInstancePermissionChecks) {
this.processInstancePermissionChecks = processInstancePermissionChecks;
}
public void ad... | }
public void addJobPermissionCheck(List<PermissionCheck> permissionChecks) {
jobPermissionChecks.addAll(permissionChecks);
}
public List<PermissionCheck> getIncidentPermissionChecks() {
return incidentPermissionChecks;
}
public void setIncidentPermissionChecks(List<PermissionCheck> incidentPermiss... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ActivityStatisticsQueryImpl.java | 1 |
请完成以下Java代码 | public boolean equals(final Object other)
{
if (other instanceof AttachmentEntryDataResource)
{
return Arrays.equals(source, ((AttachmentEntryDataResource)other).source);
}
else
{
return false;
}
}
@Override
@NonNull
public String getFilename()
{
return filename;
} | @Override
public String getDescription()
{
return description;
}
@Override
public long contentLength()
{
return source.length;
}
@Override
public InputStream getInputStream()
{
return new ByteArrayInputStream(source);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentEntryDataResource.java | 1 |
请完成以下Java代码 | public ApplicationContent read(InputStream inputStream) {
ApplicationContent application = new ApplicationContent();
try (ZipInputStream zipInputStream = new ZipInputStream(inputStream)) {
ZipEntry zipEntry;
while ((zipEntry = zipInputStream.getNextEntry()) != null) {
... | )
);
}
} catch (IOException e) {
throw new ApplicationLoadException("Unable to read zip file", e);
}
return application;
}
private byte[] readBytes(ZipInputStream zipInputStream) {
try {
return StreamUtils.copyToByteArray(z... | repos\Activiti-develop\activiti-core-common\activiti-spring-application\src\main\java\org\activiti\application\ApplicationReader.java | 1 |
请完成以下Java代码 | public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
+ ", type=" + type
+ ", userId=" + userId
+ ", time=" + time
+ ", taskId=" + taskId
+ ", processInstanceId=" + processInstanceId
+ ", rootProcessInstanceId=" +... | }
@Override
public void setRevision(int revision) {
this.revision = revision;
}
@Override
public int getRevision() {
return revision;
}
@Override
public int getRevisionNext() {
return revision + 1;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CommentEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DataEntryListValueId implements RepoIdAware
{
public static DataEntryListValueId ofRepoId(final int repoId)
{
return new DataEntryListValueId(repoId);
}
public static DataEntryListValueId ofRepoIdOrNull(final int repoId)
{
if (repoId <= 0)
{
return null;
}
return new DataEntryListValueId... | int repoId;
@JsonCreator
public DataEntryListValueId(final int repoId)
{
this.repoId = assumeGreaterThanZero(repoId, "repoId");
}
@Override
@JsonValue // note: annotating just the repoId member worked "often" which was very annoying
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\DataEntryListValueId.java | 2 |
请完成以下Java代码 | public int getPP_Order_Candidate_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_Order_Candidate_ID);
}
@Override
public org.eevolution.model.I_PP_Order getPP_Order()
{
return get_ValueAsPO(COLUMNNAME_PP_Order_ID, org.eevolution.model.I_PP_Order.class);
}
@Override
public void setPP_Order(final org.eevolution... | @Override
public int getPP_OrderCandidate_PP_Order_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_OrderCandidate_PP_Order_ID);
}
@Override
public void setQtyEntered (final @Nullable BigDecimal QtyEntered)
{
set_Value (COLUMNNAME_QtyEntered, QtyEntered);
}
@Override
public BigDecimal getQtyEntered()
{
fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_OrderCandidate_PP_Order.java | 1 |
请完成以下Java代码 | public void setM_PickingSlot_ID (final int M_PickingSlot_ID)
{
if (M_PickingSlot_ID < 1)
set_Value (COLUMNNAME_M_PickingSlot_ID, null);
else
set_Value (COLUMNNAME_M_PickingSlot_ID, M_PickingSlot_ID);
}
@Override
public int getM_PickingSlot_ID()
{
return get_ValueAsInt(COLUMNNAME_M_PickingSlot_ID);
... | {
return get_ValueAsInt(COLUMNNAME_M_PickingSlot_Trx_ID);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_PickingSlot_Trx.java | 1 |
请完成以下Java代码 | public static SOTrx ofBooleanNotNull(@NonNull final Boolean isSOTrx)
{
return isSOTrx ? SALES : PURCHASE;
}
public static Optional<SOTrx> optionalOfBoolean(@Nullable final Boolean isSOTrx)
{
return isSOTrx != null
? Optional.of(ofBooleanNotNull(isSOTrx))
: Optional.empty();
}
public boolean toBoolea... | {
return this == SALES;
}
public boolean isPurchase()
{
return this == PURCHASE;
}
/**
* @return true if AP (Account Payable), aka Purchase
*/
public boolean isAP() {return isPurchase();}
public SOTrx invert()
{
return isSales() ? PURCHASE : SALES;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\lang\SOTrx.java | 1 |
请完成以下Java代码 | public Component getComponent() {
return component;
}
public void setComponent(Component component) {
this.component = component;
}
public Map<String, String> getMap() {
return map;
}
public void setMap(Map<String, String> map) {
this.map = map;
}
publ... | public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
... | repos\tutorials-master\spring-boot-modules\spring-boot-properties\src\main\java\com\baeldung\yaml\YAMLConfig.java | 1 |
请完成以下Java代码 | public class AuditLog extends BaseData<AuditLogId> {
@Schema(description = "JSON object with Tenant Id", accessMode = Schema.AccessMode.READ_ONLY)
private TenantId tenantId;
@Schema(description = "JSON object with Customer Id", accessMode = Schema.AccessMode.READ_ONLY)
private CustomerId customerId;
... | this.entityName = auditLog.getEntityName();
this.userId = auditLog.getUserId();
this.userName = auditLog.getUserName();
this.actionType = auditLog.getActionType();
this.actionData = auditLog.getActionData();
this.actionStatus = auditLog.getActionStatus();
this.actionFailu... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\audit\AuditLog.java | 1 |
请完成以下Java代码 | public class Customer {
String id;
String name;
String gender;
int transaction_amount;
public Customer() {
}
public Customer(String id, String name, String gender, int transaction_amount) {
this.id = id;
this.name = name;
this.gender = gender;
this.transact... | public void setName(String name) {
this.name = name;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public int getTransaction_amount() {
return transaction_amount;
}
public void setTransact... | repos\tutorials-master\apache-spark\src\main\java\com\baeldung\dataframes\Customer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Optional<String> extractConstraintName(SQLException ex) {
final String sqlState = JdbcExceptionHelper.extractSqlState( ex );
if (sqlState != null) {
String sqlStateClassCode = JdbcExceptionHelper.determineSqlStateClassCode( sqlState );
if ( sqlStateClassCode != null ) {
... | for (CassandraToSqlColumn column : columns) {
insertStatementBuilder.append(column.getSqlColumnName()).append(",");
}
insertStatementBuilder.deleteCharAt(insertStatementBuilder.length() - 1);
insertStatementBuilder.append(") VALUES (");
for (CassandraToSqlColumn column : colu... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\install\migrate\CassandraToSqlTable.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public AtomikosDataSourceBean inventoryDataSource() {
AtomikosDataSourceBean dataSource = new AtomikosDataSourceBean();
dataSource.setLocalTransactionMode(true);
dataSource.setUniqueResourceName("db1");
dataSource.setXaDataSourceClassName("org.apache.derby.jdbc.EmbeddedXADataSource");
... | factory.setPackagesToScan("com.baeldung.atomikos.spring.jpa.inventory");
factory.setDataSource(inventoryDataSource());
Properties jpaProperties = new Properties();
//jpaProperties.put("hibernate.show_sql", "true");
//jpaProperties.put("hibernate.format_sql", "true");
jpaPropertie... | repos\tutorials-master\persistence-modules\atomikos\src\main\java\com\baeldung\atomikos\spring\jpa\inventory\InventoryConfig.java | 2 |
请完成以下Java代码 | public K getKey() { return key; }
/**
* Value of this this <code>Pair</code>.
*/
private V value;
/**
* Gets the value for this pair.
* @return value for this pair
*/
public V getValue() { return value; }
/**
* Creates a new pair
* @param key The key for this pa... | // in order to make sure there is a difference in the hashCode between
// these two parameters:
// name: a value: aa
// name: aa value: a
return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
}
/**
* <p>Test this <code>Pair</code> for equality with another... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\Pair.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public de.metas.pos.repository.model.I_C_POS_Payment getC_POS_Payment()
{
return get_ValueAsPO(COLUMNNAME_C_POS_Payment_ID, de.metas.pos.repository.model.I_C_POS_Payment.class);
}
@Override
public void setC_POS_Payment(final de.metas.pos.repository.model.I_C_POS_Payment C_POS_Payment)
{
set_ValueFromPO(COLUMN... | public static final String TYPE_CashPayment = "CASH_PAY";
/** CardPayment = CARD_PAY */
public static final String TYPE_CardPayment = "CARD_PAY";
/** CashInOut = CASH_INOUT */
public static final String TYPE_CashInOut = "CASH_INOUT";
/** CashClosingDifference = CASH_DIFF */
public static final String TYPE_CashClo... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_JournalLine.java | 2 |
请完成以下Java代码 | public void setSurchargeAmt (final @Nullable BigDecimal SurchargeAmt)
{
set_Value (COLUMNNAME_SurchargeAmt, SurchargeAmt);
}
@Override
public BigDecimal getSurchargeAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SurchargeAmt);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public... | public BigDecimal getTotalVat()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TotalVat);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setTotalVatWithSurchargeAmt (final BigDecimal TotalVatWithSurchargeAmt)
{
set_ValueNoCheck (COLUMNNAME_TotalVatWithSurchargeAmt, TotalVatWith... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_invoic_v.java | 1 |
请完成以下Java代码 | public static Date dateFrom(long timestamp) {
return new Date(timestamp);
}
public static Calendar calendarFrom(long timestamp) {
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(timestamp);
return calendar;
}
public static Instant fromNanos(long tim... | return LocalDateTime.ofInstant(instant, ZoneOffset.UTC);
}
private static long millis(long timestamp) {
if (timestamp >= 1E16 || timestamp <= -1E16) {
return timestamp / 1_000_000;
}
if (timestamp >= 1E14 || timestamp <= -1E14) {
return timestamp / 1_000;
... | repos\tutorials-master\core-java-modules\core-java-date-operations-3\src\main\java\com\baeldung\unixtime\UnixTimeUtils.java | 1 |
请完成以下Java代码 | public String getDescription(final String adLanguage)
{
return description.translate(adLanguage);
}
public List<DocumentLayoutSectionDescriptor> getSections()
{
return sections;
}
public List<DocumentLayoutElementDescriptor> getElements()
{
List<DocumentLayoutElementDescriptor> elements = _elements;
if... | public Builder setCaption(final ITranslatableString caption)
{
this.caption = caption;
return this;
}
public Builder setDescription(final ITranslatableString description)
{
this.description = description;
return this;
}
public Builder notFoundMessages(@Nullable NotFoundMessages notFoundMessage... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutSingleRow.java | 1 |
请完成以下Java代码 | public class AuthenticationPayloadInterceptor implements PayloadInterceptor, Ordered {
private final ReactiveAuthenticationManager authenticationManager;
private int order;
private PayloadExchangeAuthenticationConverter authenticationConverter = new BasicAuthenticationPayloadExchangeConverter();
/**
* Creates... | }
@Override
public Mono<Void> intercept(PayloadExchange exchange, PayloadInterceptorChain chain) {
return this.authenticationConverter.convert(exchange)
.switchIfEmpty(chain.next(exchange).then(Mono.empty()))
.flatMap((a) -> this.authenticationManager.authenticate(a))
.flatMap((a) -> onAuthenticationSucce... | repos\spring-security-main\rsocket\src\main\java\org\springframework\security\rsocket\authentication\AuthenticationPayloadInterceptor.java | 1 |
请完成以下Java代码 | public boolean isOneQRCodeForAggregatedHUs()
{
return get_ValueAsBoolean(COLUMNNAME_IsOneQRCodeForAggregatedHUs);
}
@Override
public void setIsOneQRCodeForMatchingAttributes (final boolean IsOneQRCodeForMatchingAttributes)
{
set_Value (COLUMNNAME_IsOneQRCodeForMatchingAttributes, IsOneQRCodeForMatchingAttrib... | return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setQRCode_Configuration_ID (final int QRCode_Configuration_ID)
{
if (QRCode_Configuration_ID < 1)
set_ValueNoCheck (COLUMNNAME_QRCode_Configuration_ID, null);
else
set_ValueNoCheck (COLUMNNAME_QRCode_Configuration_ID, QRCode_Configurati... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_QRCode_Configuration.java | 1 |
请完成以下Java代码 | protected ProcessDefinitionEntity resolveSourceProcessDefinition(CommandContext commandContext) {
String sourceProcessDefinitionId = executionBuilder.getMigrationPlan()
.getSourceProcessDefinitionId();
ProcessDefinitionEntity sourceProcessDefinition =
getProcessDefinition(commandContext, sourc... | getProcessDefinition(commandContext, targetProcessDefinitionId);
EnsureUtil.ensureNotNull("sourceProcessDefinition", sourceProcessDefinition);
return sourceProcessDefinition;
}
protected ProcessDefinitionEntity getProcessDefinition(CommandContext commandContext,
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\AbstractMigrationCmd.java | 1 |
请完成以下Java代码 | private static UserNotificationRequest toUserNotification(@NonNull final I_M_Inventory inventory)
{
final TableRecordReference inventoryRef = TableRecordReference.of(inventory);
return UserNotificationRequest.builder()
.topic(EVENTBUS_TOPIC)
.recipientUserId(getNotificationRecipientUserId(inventory))
... | if (loggedUserId != null)
{
return loggedUserId;
}
return UserId.ofRepoId(inventory.getUpdatedBy()); // last updated
}
//
// Fallback: notify only the creator
else
{
return UserId.ofRepoId(inventory.getCreatedBy());
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inventory\event\InventoryUserNotificationsProducer.java | 1 |
请完成以下Java代码 | public void onOpen(Session session, @PathParam("userId") String userId, @PathParam("pageId") String pageId) {
try {
this.userId = userId;
this.pageId = pageId;
this.socketId = userId + pageId;
this.session = session;
socketPool.put(this.socketId, this... | } catch (Exception e) {
log.warn("【vxeSocket】收到不合法的消息:" + message);
return;
}
String type = json.getString(VxeSocketConst.TYPE);
switch (type) {
// 心跳检测
case VxeSocketConst.TYPE_HB:
this.sendMessage(VxeSocket.packageMessage(type, tr... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-module-demo\src\main\java\org\jeecg\modules\demo\mock\vxe\websocket\VxeSocket.java | 1 |
请完成以下Java代码 | public int getHR_Process_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_HR_Process_ID);
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 ... | {
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Process.java | 1 |
请完成以下Java代码 | public class AuthorizationPayloadInterceptor implements PayloadInterceptor, Ordered {
private final ReactiveAuthorizationManager<PayloadExchange> authorizationManager;
private int order;
public AuthorizationPayloadInterceptor(ReactiveAuthorizationManager<PayloadExchange> authorizationManager) {
Assert.notNull(a... | this.order = order;
}
@Override
@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1290
public Mono<Void> intercept(PayloadExchange exchange, PayloadInterceptorChain chain) {
return ReactiveSecurityContextHolder.getContext()
.mapNotNull(SecurityContext::getAuthentication)
.switchIfEmp... | repos\spring-security-main\rsocket\src\main\java\org\springframework\security\rsocket\authorization\AuthorizationPayloadInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((comments == null) ? 0 : comments.hashCode());
result = prime * result + (completed ? 1231 : 1237);
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((taskId == n... | return false;
} else if (!taskId.equals(other.taskId))
return false;
if (userName == null) {
if (other.userName != null)
return false;
} else if (!userName.equals(other.userName))
return false;
return true;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String to... | repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\dtos\TaskDTO.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException {
SecurityUser securityUser = (SecurityUser) authentication.getPrincipal();
JwtPair tokenPair;
if (authenticati... | * Removes temporary authentication-related data which may have been stored
* in the session during the authentication process..
*
*/
protected final void clearAuthenticationAttributes(HttpServletRequest request) {
HttpSession session = request.getSession(false);
if (session == null) ... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\rest\RestAwareAuthenticationSuccessHandler.java | 2 |
请完成以下Java代码 | public List<HistoricActivityInstanceEntity> findUnfinishedHistoricActivityInstancesByProcessInstanceId(
final String processInstanceId
) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("processInstanceId", processInstanceId);
return getList(
"sele... | @Override
@SuppressWarnings("unchecked")
public List<HistoricActivityInstance> findHistoricActivityInstancesByNativeQuery(
Map<String, Object> parameterMap,
int firstResult,
int maxResults
) {
return getDbSqlSession().selectListWithRawParameter(
"selectHistoricAct... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisHistoricActivityInstanceDataManager.java | 1 |
请完成以下Java代码 | public BigDecimal getQM_QtyDeliveredPercOfRaw()
{
return qtyDeliveredPercOfRaw;
}
@Override
public void setQM_QtyDeliveredAvg(final BigDecimal qtyDeliveredAvg)
{
Check.assumeNotNull(qtyDeliveredAvg, "qtyDeliveredAvg not null");
this.qtyDeliveredAvg = qtyDeliveredAvg;
}
@Override
public BigDecimal getQM_... | }
@Override
public BOMComponentType getComponentType()
{
return null;
}
@Override
public IHandlingUnitsInfo getHandlingUnitsInfo()
{
return handlingUnitsInfo;
}
@Override
public I_M_Product getMainComponentProduct()
{
return null;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PlainProductionMaterial.java | 1 |
请完成以下Java代码 | public void setAD_BusinessRule_ID (final int AD_BusinessRule_ID)
{
if (AD_BusinessRule_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_BusinessRule_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_BusinessRule_ID, AD_BusinessRule_ID);
}
@Override
public int getAD_BusinessRule_ID()
{
return get_ValueAsInt(CO... | set_Value (COLUMNNAME_OnUpdate, OnUpdate);
}
@Override
public boolean isOnUpdate()
{
return get_ValueAsBoolean(COLUMNNAME_OnUpdate);
}
@Override
public void setSource_Table_ID (final int Source_Table_ID)
{
if (Source_Table_ID < 1)
set_Value (COLUMNNAME_Source_Table_ID, null);
else
set_Value (CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule_Trigger.java | 1 |
请完成以下Java代码 | public class IterableSize {
/**
* Get the size of {@code Iterable} using Java 7.
*
* @param data the iterable
* @return the size of the iterable
*/
public static int sizeUsingJava7(final Iterable data) {
if (data instanceof Collection) {
return ((Collection<?>) dat... | /**
* Get the size of {@code Iterable} using Apache Collections.
*
* @param data the iterable
* @return the size of the iterable
*/
public static int sizeUsingApacheCollections(final Iterable data) {
return IterableUtils.size(data);
}
/**
* Get the size of {@code Iter... | repos\tutorials-master\core-java-modules\core-java-collections-2\src\main\java\com\baeldung\collections\iterablesize\IterableSize.java | 1 |
请完成以下Java代码 | default Instant getExpiresAt() {
return getClaimAsInstant(OAuth2TokenClaimNames.EXP);
}
/**
* Returns the Not Before {@code (nbf)} claim which identifies the time before which
* the OAuth 2.0 Token MUST NOT be accepted for processing.
* @return the Not Before time before which the OAuth 2.0 Token MUST NOT be... | * @return the Issued at claim which identifies the time at which the OAuth 2.0 Token
* was issued
*/
default Instant getIssuedAt() {
return getClaimAsInstant(OAuth2TokenClaimNames.IAT);
}
/**
* Returns the ID {@code (jti)} claim which provides a unique identifier for the OAuth
* 2.0 Token.
* @return the... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\token\OAuth2TokenClaimAccessor.java | 1 |
请完成以下Spring Boot application配置 | # # H2 database configuration steps
#debug=true
#
##H2 embedded static database
#datasource.security.driver-class-name=org.h2.Driver
#
## H2 configuration using hibernate.
#datasource.security.url=jdbc:h2:mem:management;DB_CLOSE_DELAY=-1
#datasource.security.username=sa
#datasource.security.password=
#
## S... | .security.username=root
datasource.security.password=posilka2020
# Secutiry datasource configuration
datasource.security.initialize=false
# Configuration MySQL
datasource.orders.driver-class-name=com.mysql.jdbc.Driver
datasource.orders.url=jdbc:mysql://localhost:3306/ordersdb
datasource.orders.username=root
datasourc... | repos\Spring-Boot-Advanced-Projects-main\Springboot-Multiple-DataStructure\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public void setIsBPartnerFlatDiscount (final boolean IsBPartnerFlatDiscount)
{
set_Value (COLUMNNAME_IsBPartnerFlatDiscount, IsBPartnerFlatDiscount);
}
@Override
public boolean isBPartnerFlatDiscount()
{
return get_ValueAsBoolean(COLUMNNAME_IsBPartnerFlatDiscount);
}
@Override
public org.compiere.model.I... | public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setProcessing (final boolean Processing)
{
set_Value (COLUMNNAME_Processing, Processing);
}
@Override
public boolean isProcessing()
{
return get_ValueAsBoolean(COLUMNNAME_Processing);
}
@Override... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DiscountSchema.java | 1 |
请完成以下Java代码 | public boolean isHasRegion ()
{
Object oo = get_Value(COLUMNNAME_HasRegion);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Reverse Local Address Lines.
@param IsAddressLinesLocalReverse
Print Local Ad... | /** Set Name.
@param Name Name */
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Name */
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Region.
@param RegionName ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Country.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MvcConfig implements WebMvcConfigurer {
public MvcConfig() {
super();
}
//
@Override
public void configureMessageConverters(final List<HttpMessageConverter<?>> messageConverters) {
final Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
... | xmlConverter.setMarshaller(xstreamMarshaller);
xmlConverter.setUnmarshaller(xstreamMarshaller);
return xmlConverter;
}
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.defaultContentType(MediaType.APPLICATION_JSON);
}
... | repos\tutorials-master\spring-web-modules\spring-rest-simple\src\main\java\com\baeldung\config\MvcConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ProductUpsertRequestProducer
{
@NonNull
String orgCode;
@NonNull
List<LineItem> articles;
@NonNull
ProductRequestProducerResult.ProductRequestProducerResultBuilder resultBuilder;
@Builder
public ProductUpsertRequestProducer(
@NonNull final String orgCode,
@NonNull final List<LineItem> arti... | resultBuilder.jsonRequestProductUpsert(jsonRequestProductUpsert);
return Optional.of(resultBuilder.build());
}
@NonNull
private List<JsonRequestProductUpsertItem> getProductItems()
{
return articles.stream()
.map(this::mapArticleToProductRequestItem)
.collect(Collectors.toList());
}
@NonNull
priva... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\de-metas-camel-ebay-camelroutes\src\main\java\de\metas\camel\externalsystems\ebay\processor\product\ProductUpsertRequestProducer.java | 2 |
请完成以下Java代码 | public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String getTypeName() {
if(value != null) {
return value.getType().getName();
}
else {
return null;
}
}
public String getName() {
return name;
}
public Object getValue() {
if(value != null... | public static DelegateCaseVariableInstanceImpl fromVariableInstance(VariableInstance variableInstance) {
DelegateCaseVariableInstanceImpl delegateInstance = new DelegateCaseVariableInstanceImpl();
delegateInstance.variableId = variableInstance.getId();
delegateInstance.processDefinitionId = variableInstance... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\variable\listener\DelegateCaseVariableInstanceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public String getParentTaskId() {
return parentTaskId;
}
public void setParentTaskId(String parentTaskId) {
this.parentTaskId = parentTaskId;
}
... | public String getScopeType() {
return scopeType;
}
public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
public String getPropagatedStageInstanceId() {
return propagatedStageInstanceId;
}
public void setPropagatedStageInstanceId(String propagatedSt... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskInstanceResponse.java | 2 |
请完成以下Java代码 | public final BigDecimal getQualityAdjustmentForDateOrNull(final Date date)
{
if(date.after(getValidToDate()))
{
return maximumQualityAdjustment;
}
final int month = TimeUtil.asCalendar(date).get(Calendar.MONTH);
return getQualityAdjustmentForMonthOrNull(month);
}
/**
* @return zero if the given perce... | if (currentPercentage.compareTo(percentage) <= 0
&& nextPercentage.compareTo(percentage) > 0)
{
// found it: 'percentage' is in the interval that starts with 'currentPercentage'
return feeProductPercentage2fee.get(currentPercentage);
}
}
final BigDecimal lastInterval = percentages.get(percentage... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\ch\lagerkonf\impl\RecordBackedQualityBasedConfig.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CRUDController {
@GetMapping
public List<CrudInput> read(@RequestBody @Valid CrudInput crudInput) {
List<CrudInput> returnList = new ArrayList<>();
returnList.add(crudInput);
return returnList;
}
@ResponseStatus(HttpStatus.CREATED)
@PostMapping
public HttpH... | HttpHeaders delete(@PathVariable("id") long id) {
return new HttpHeaders();
}
@PutMapping("/{id}")
@ResponseStatus(HttpStatus.ACCEPTED)
void put(@PathVariable("id") long id, @RequestBody CrudInput crudInput) {
}
@PatchMapping("/{id}")
public List<CrudInput> patch(@PathVariable("id... | repos\tutorials-master\spring-5-rest-docs\src\main\java\com\baeldung\restdocs\CRUDController.java | 2 |
请完成以下Java代码 | protected void initializeActivity(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
super.initializeActivity(element, activity, context);
initializeResultVariable(element, activity, context);
initializeDecisionTableResultMapper(element, activity, context);
}
protected void ini... | }
}
return decision;
}
protected String getBinding(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
DecisionTask definition = getDefinition(element);
return definition.getCamundaDecisionBinding();
}
protected String getVersion(CmmnElement element, CmmnActivity activit... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\handler\DecisionTaskItemHandler.java | 1 |
请完成以下Java代码 | public KeyValues getHighCardinalityKeyValues(AuthorizationObservationContext<?> context) {
return KeyValues.of("spring.security.authentication.authorities", getAuthorities(context))
.and("spring.security.authorization.decision.details", getDecisionDetails(context));
}
@Override
public boolean supportsContext(O... | return className;
}
private String getAuthorizationDecision(AuthorizationObservationContext<?> context) {
if (context.getAuthorizationResult() == null) {
return "unknown";
}
return String.valueOf(context.getAuthorizationResult().isGranted());
}
private String getAuthorities(AuthorizationObservationContex... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\AuthorizationObservationConvention.java | 1 |
请完成以下Java代码 | public class User {
private String name;
private int age;
private String pass;
public User(String name, int age, String pass) {
this.name = name;
this.age = age;
this.pass = pass;
}
public String getName() {
return name;
}
public void setName(String nam... | }
public void setAge(int age) {
this.age = age;
}
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
@Override
public String toString() {
return ("name=" + this.name + ",age=" + this.age + ",pass=" + this.pa... | repos\spring-boot-leaning-master\1.x\第05课:模板引擎 Thymeleaf\spring-boot-thymeleaf\src\main\java\com\neo\domain\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected OtaPackage prepare(EntitiesImportCtx ctx, OtaPackage otaPackage, OtaPackage oldOtaPackage, OtaPackageExportData exportData, IdProvider idProvider) {
otaPackage.setDeviceProfileId(idProvider.getInternalId(otaPackage.getDeviceProfileId()));
return otaPackage;
}
@Override
protected O... | @Override
protected OtaPackage saveOrUpdate(EntitiesImportCtx ctx, OtaPackage otaPackage, OtaPackageExportData exportData, IdProvider idProvider, CompareResult compareResult) {
if (otaPackage.hasUrl()) {
OtaPackageInfo info = new OtaPackageInfo(otaPackage);
return new OtaPackage(otaP... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\OtaPackageImportService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public abstract class AbstractProcessAutoDeploymentStrategy extends CommonAutoDeploymentStrategy<ProcessEngine> {
public AbstractProcessAutoDeploymentStrategy() {
super();
}
public AbstractProcessAutoDeploymentStrategy(CommonAutoDeploymentProperties deploymentProperties) {
super(deployment... | protected void addResource(Resource resource, String resourceName, DeploymentBuilder deploymentBuilder) {
try (InputStream inputStream = resource.getInputStream()) {
if (resourceName.endsWith(".bar") || resourceName.endsWith(".zip") || resourceName.endsWith(".jar")) {
try (ZipInputSt... | repos\flowable-engine-main\modules\flowable-spring\src\main\java\org\flowable\spring\configurator\AbstractProcessAutoDeploymentStrategy.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getGroupId() {
return this.groupId;
}
void setGroupId(String groupId) {
this.groupId = groupId;
}
/**
* The type of the source. Usually this is the fully qualified name of a class that
* defines configuration items. This class may or may not be available at runtime.
* @return the type
*/... | void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
/**
* The method name that defines this source, if any.
* @return the source method
*/
public String getSourceMethod() {
return this.sourceMethod;
}
void setSourceMethod(String sourceMethod) {
this.sourceMethod = sourceMethod;
}... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-metadata\src\main\java\org\springframework\boot\configurationmetadata\ConfigurationMetadataSource.java | 2 |
请完成以下Java代码 | public class FreshQtyOnHandDAO implements IFreshQtyOnHandDAO
{
@Override
public List<I_Fresh_QtyOnHand_Line> retrieveLines(final I_Fresh_QtyOnHand qtyOnHandHeader)
{
final List<I_Fresh_QtyOnHand_Line> result = Services.get(IQueryBL.class)
.createQueryBuilder(I_Fresh_QtyOnHand_Line.class, qtyOnHandHeader)
.... | return result;
}
@NonNull
public I_Fresh_QtyOnHand getById(@NonNull final FreshQtyOnHandId freshQtyOnHandId)
{
final I_Fresh_QtyOnHand freshQtyOnHandRecord = InterfaceWrapperHelper.load(freshQtyOnHandId, I_Fresh_QtyOnHand.class);
if (freshQtyOnHandRecord == null)
{
throw new AdempiereException("@NotFound@... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\freshQtyOnHand\api\impl\FreshQtyOnHandDAO.java | 1 |
请完成以下Java代码 | public boolean isMarshallableAsElement() {
return true;
}
}
/**
* Marshall a list of objects.
*/
private static class ObjectListMarshaller extends AttributeMarshaller {
private ObjectListMarshaller() {}
@Override
public boolean isMarshallableAsElement() {
return true;
}
... | if (resourceModel.hasDefined(attribute.getName())) {
writer.writeStartElement(attribute.getXmlName());
for (ModelNode element: resourceModel.get(attribute.getName()).asList()) {
writer.writeStartElement(objectType.getXmlName());
for (AttributeDefinition valueType : valueTypes) {
... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\util\CustomMarshaller.java | 1 |
请完成以下Java代码 | public class API_Audit_Repeat extends JavaProcess implements IProcessPrecondition
{
private final ApiRequestReplayService apiRequestReplayService = SpringContextHolder.instance.getBean(ApiRequestReplayService.class);
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final static String ONLY_WIT... | if (isOnlyWithError)
{
selectedApiRequestsQueryBuilder.addEqualsFilter(I_API_Request_Audit.COLUMNNAME_Status, Status.ERROR.getCode());
}
final IQueryOrderBy orderBy = queryBL.createQueryOrderByBuilder(I_API_Request_Audit.class)
.addColumnAscending(I_API_Request_Audit.COLUMNNAME_Time)
.createQueryOrder... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\process\API_Audit_Repeat.java | 1 |
请完成以下Java代码 | public class BOMCostPrice
{
@Getter
private final ProductId productId;
@Getter
private final UomId uomId;
private final HashMap<CostElementId, BOMCostElementPrice> pricesByElementId;
@Builder
private BOMCostPrice(
@NonNull final ProductId productId,
@NonNull final UomId uomId,
@NonNull @Singular final ... | public void setComponentsCostPrice(
@NonNull final CostAmount costPrice,
@NonNull final CostElementId costElementId)
{
pricesByElementId.computeIfAbsent(costElementId, k -> BOMCostElementPrice.zero(costElementId, costPrice.getCurrencyId(), uomId))
.setComponentsCostPrice(costPrice);
}
public void clearC... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOMCostPrice.java | 1 |
请完成以下Java代码 | public void startOrStopEmbeddedClient(@NonNull final I_AD_Printer_Config printerConfig)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(printerConfig);
final String hostKey = printClientsBL.getHostKeyOrNull(ctx);
if (Check.isBlank(hostKey) || !Objects.equals(hostKey, printerConfig.getConfigHostKey()))
... | /**
* Needed because we want to order by ConfigHostKey and "unspecified" shall always be last.
*/
@ModelChange(
timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE },
ifColumnsChanged = I_AD_Printer_Config.COLUMNNAME_ConfigHostKey)
public void trimBlankHostKeyToNull(@NonNull final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\model\validator\AD_Printer_Config.java | 1 |
请完成以下Java代码 | public Mono<String> getData(String stockId) {
return webClient.get()
.uri(PATH_BY_ID, stockId)
.accept(MediaType.APPLICATION_JSON)
.retrieve()
.onStatus(HttpStatusCode::is5xxServerError, response -> Mono.error(new ServiceException("Server error", response.statusCo... | public Mono<String> getDataWithRetryBackoff(String stockId) {
return webClient.get()
.uri(PATH_BY_ID, stockId)
.accept(MediaType.APPLICATION_JSON)
.retrieve()
.bodyToMono(String.class)
.retryWhen(Retry.backoff(3, Duration.ofSeconds(2)));
}
pub... | repos\tutorials-master\spring-reactive-modules\spring-webflux\src\main\java\com\baeldung\spring\retry\ExternalConnector.java | 1 |
请完成以下Java代码 | public void setConfiguration(String configuration) {
this.configuration = configuration;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String getJobDefinitionId() {
return jobDefinitionId;
}
public voi... | }
public void setHistoryConfiguration(String historicConfiguration) {
this.historyConfiguration = historicConfiguration;
}
public String getFailedActivityId() {
return failedActivityId;
}
public void setFailedActivityId(String failedActivityId) {
this.failedActivityId = failedActivityId;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\incident\IncidentContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Class getObjectType() {
return MySpringShiroFilter.class;
}
@Override
protected AbstractShiroFilter createInstance() throws Exception {
SecurityManager securityManager = getSecurityManager();
if (securityManager == null) {
String msg = "SecurityManager property m... | //Now create a concrete ShiroFilter instance and apply the acquired SecurityManager and built
//FilterChainResolver. It doesn't matter that the instance is an anonymous inner class
//here - we're just using it because it is a concrete AbstractShiroFilter instance that accepts
//injection of the... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\shiro\filters\CustomShiroFilterFactoryBean.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class AopConfig {
/**
* Aspects monitor multiple annotations, because one annotation is Check and multiple annotations are compiled to CheckContainer
*/
@Pointcut("@annotation(com.et.annotation.CheckContainer) || @annotation(com.et.annotation.Check)")
public void pointcut() {
}
@Before("pointcut()")
... | }
for (int i = 0; i < value.size(); i++) {
Check check = value.get(i);
String ex = check.ex();
//In the rule engine, null is represented by nil
ex = ex.replaceAll("null", "nil");
String msg = check.msg();
if (StringUtils.isEmpty(msg)) {
msg = "server exception...";
}
Map<String, Object> m... | repos\springboot-demo-master\Aviator\src\main\java\com\et\annotation\AopConfig.java | 2 |
请完成以下Java代码 | public class RelationsSearchParameters {
@Schema(description = "Root entity id to start search from.", example = "784f394c-42b6-435a-983c-b7beff2784f9")
private UUID rootId;
@Schema(description = "Type of the root entity.")
private EntityType rootType;
@Schema(description = "Type of the root entity... | public RelationsSearchParameters(EntityId entityId, EntitySearchDirection direction, int maxLevel, RelationTypeGroup relationTypeGroup, boolean fetchLastLevelOnly) {
this.rootId = entityId.getId();
this.rootType = entityId.getEntityType();
this.direction = direction;
this.maxLevel = maxL... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\relation\RelationsSearchParameters.java | 1 |
请完成以下Java代码 | protected List<ProcessEnginePluginXml> getPlugins(ModelNode plugins) {
List<ProcessEnginePluginXml> pluginConfigurations = new ArrayList<>();
if (plugins.isDefined()) {
for (final ModelNode plugin : plugins.asList()) {
ProcessEnginePluginXml processEnginePluginXml = new ProcessEnginePluginXml() ... | }
return pluginConfigurations;
}
protected Map<String, String> getProperties(ModelNode properties) {
Map<String, String> propertyMap = new HashMap<>();
if (properties.isDefined()) {
for (Property property : properties.asPropertyList()) {
propertyMap.put(property.getName(), property.getVa... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\extension\handler\ProcessEngineAdd.java | 1 |
请完成以下Java代码 | private void updateShipmentOrderRequestPO(@NonNull final DeliveryOrder deliveryOrder)
{
for (final DeliveryOrderParcel deliveryOrderParcel : deliveryOrder.getDeliveryOrderParcels())
{
final PackageId packageId = deliveryOrderParcel.getPackageId();
final DhlCustomDeliveryData customDeliveryData = DhlCustomDel... | }
@VisibleForTesting
I_DHL_ShipmentOrder getShipmentOrderByRequestIdAndPackageId(final int requestId, final int packageId)
{
return queryBL
.createQueryBuilder(I_DHL_ShipmentOrder.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_DHL_ShipmentOrder.COLUMNNAME_DHL_ShipmentOrderRequest_ID, requestI... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\DhlDeliveryOrderRepository.java | 1 |
请完成以下Java代码 | public void dispose()
{
if (p_data != null)
{
p_data.clear();
}
p_data = null;
m_selectedObject = null;
m_tempData = null;
m_loaded = false;
} // dispose
/**
* Wait until async Load Complete
*/
public void loadComplete()
{
} // loadComplete
/**
* Set lookup model as mandatory, use... | return ImmutableSet.of();
}
/**
*
* @return evaluation context
*/
public IValidationContext getValidationContext()
{
return IValidationContext.NULL;
}
/**
* Suggests a valid value for given value
*
* @param value
* @return equivalent valid value or same this value is valid; if there are no sugge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\Lookup.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ReactiveJwtDecoder jwtDecoder(SecurityMetersService metersService) {
NimbusReactiveJwtDecoder jwtDecoder = NimbusReactiveJwtDecoder.withSecretKey(getSecretKey()).macAlgorithm(JWT_ALGORITHM).build();
return token -> {
try {
return jwtDecoder
.decode(... | };
}
@Bean
public JwtEncoder jwtEncoder() {
return new NimbusJwtEncoder(new ImmutableSecret<>(getSecretKey()));
}
@Bean
public ReactiveJwtAuthenticationConverter jwtAuthenticationConverter() {
JwtGrantedAuthoritiesConverter grantedAuthoritiesConverter = new JwtGrantedAuthoritie... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\config\SecurityJwtConfiguration.java | 2 |
请完成以下Spring Boot application配置 | ##########################################################
################## 所有profile共有的配置 #################
##########################################################
################### 项目启动端口 ###################
server.port: 8092
################### spring配置 ###################
spring:
profiles:
acti... | #############
#####################################################################
spring:
profiles: dev
logging:
level:
root: INFO
com.xncoding: DEBUG
path: D:/logs/springboot-aop | repos\SpringBootBucket-master\springboot-aop\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public StatusUpdater timeout(Duration timeout) {
this.timeout = timeout;
return this;
}
public Mono<Void> updateStatus(InstanceId id) {
return this.repository.computeIfPresent(id, (key, instance) -> this.doUpdateStatus(instance)).then();
}
protected Mono<Instance> doUpdateStatus(Instance instance) {
if (!... | details.put("status", httpStatus.value());
details.put("error", Objects.requireNonNull(HttpStatus.resolve(httpStatus.value())).getReasonPhrase());
if (body.get("details") instanceof Map) {
details.putAll((Map<? extends String, ?>) body.get("details"));
}
else {
details.putAll(body);
}
return StatusInf... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\services\StatusUpdater.java | 2 |
请完成以下Java代码 | 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;
public do... | }
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
} | repos\tutorials-master\json-modules\json-operations\src\main\java\com\baeldung\sorting\SolarEvent.java | 1 |
请完成以下Java代码 | public int hashCode() {
int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
... | }
Role role = (Role) obj;
if (!role.equals(role.name)) {
return false;
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Role [name=").append(name).append("]").append("[id=").append(... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\model\Role.java | 1 |
请完成以下Java代码 | public String toStandardFormat() {
return this.property;
}
private static String validateFormat(String property) {
for (char c : property.toCharArray()) {
if (Character.isUpperCase(c)) {
throw new IllegalArgumentException("Invalid property '" + property + "', must not contain upper case");
}
if (!Ch... | }
VersionProperty that = (VersionProperty) o;
return this.internal == that.internal && this.property.equals(that.property);
}
@Override
public int hashCode() {
return Objects.hash(this.property, this.internal);
}
@Override
public String toString() {
return this.property;
}
} | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\version\VersionProperty.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfig extends AbstractHttpConfigurer<SecurityConfig, HttpSecurity> {
@Autowired
private CustomUserDetailsService userDetailsService;
@Autowired
private PasswordEncoder passwordEncoder;
@Override
public void configure(HttpSecurity http) {
AuthenticationManager aut... | .with(securityConfig(), Customizer.withDefaults());
return http.build();
}
public CustomAuthenticationFilter authenticationFilter(AuthenticationManager authenticationManager) {
CustomAuthenticationFilter filter = new CustomAuthenticationFilter();
filter.setAuthenticationManager(authenti... | repos\tutorials-master\spring-security-modules\spring-security-web-login-2\src\main\java\com\baeldung\loginextrafieldscustom\SecurityConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class TimeBookingRepository
{
private final IQueryBL queryBL;
public TimeBookingRepository(final IQueryBL queryBL)
{
this.queryBL = queryBL;
}
public TimeBookingId save(@NonNull final TimeBooking timeBooking)
{
final I_S_TimeBooking record = InterfaceWrapperHelper.loadOrNew(timeBooking.getTimeBooking... | {
return queryBL
.createQueryBuilder(I_S_TimeBooking.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_S_TimeBooking.COLUMNNAME_S_Issue_ID, issueId.getRepoId())
.create()
.list()
.stream()
.map(this::buildTimeBooking)
.collect(ImmutableList.toImmutableList());
}
private TimeBo... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\timebooking\TimeBookingRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public final class Saml2ResponseValidatorResult {
static final Saml2ResponseValidatorResult NO_ERRORS = new Saml2ResponseValidatorResult(Collections.emptyList());
private final Collection<Saml2Error> errors;
private Saml2ResponseValidatorResult(Collection<Saml2Error> errors) {
Assert.notNull(errors, "errors can... | /**
* Construct a successful {@link Saml2ResponseValidatorResult}
* @return an {@link Saml2ResponseValidatorResult} with no errors
*/
public static Saml2ResponseValidatorResult success() {
return NO_ERRORS;
}
/**
* Construct a failure {@link Saml2ResponseValidatorResult} with the provided detail
* @para... | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\core\Saml2ResponseValidatorResult.java | 2 |
请完成以下Java代码 | public void setM_CostQueue_ID (int M_CostQueue_ID)
{
if (M_CostQueue_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_CostQueue_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_CostQueue_ID, Integer.valueOf(M_CostQueue_ID));
}
/** Get Kosten-Reihe.
@return FiFo/LiFo Cost Queue
*/
@Override
public int getM_Co... | return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Product_ID, org.compiere.model.I_M_Product.class);
}
@Override
public void setM_Product(org.compiere.model.I_M_Product M_Product)
{
set_ValueFromPO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostQueue.java | 1 |
请完成以下Java代码 | public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException {
onEmptyElement();
super.writeEmptyElement(namespaceURI, localName);
}
@Override
public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException {
... | }
@Override
public void writeCharacters(String text) throws XMLStreamException {
state = SEEN_DATA;
super.writeCharacters(text);
}
@Override
public void writeCharacters(char[] text, int start, int len) throws XMLStreamException {
state = SEEN_DATA;
super.writeCharac... | repos\flowable-engine-main\modules\flowable-bpmn-converter\src\main\java\org\flowable\bpmn\converter\IndentingXMLStreamWriter.java | 1 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set UseDate.
@param UseDate UseDate... | Currently used units of the assets
*/
public void setUseUnits (int UseUnits)
{
set_Value (COLUMNNAME_UseUnits, Integer.valueOf(UseUnits));
}
/** Get Use units.
@return Currently used units of the assets
*/
public int getUseUnits ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UseUnits);
if (ii == ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Use.java | 1 |
请完成以下Java代码 | private static NotificationGroupMap ofCollection(@NonNull final Collection<NotificationGroup> collection)
{
return collection.isEmpty() ? EMPTY : new NotificationGroupMap(collection);
}
public static Collector<NotificationGroup, ?, NotificationGroupMap> collect()
{
return GuavaCollectors.collectUsingListAccumu... | public Optional<NotificationGroupName> getNameById(@NonNull final NotificationGroupId notificationGroupId)
{
return Optional.ofNullable(byId.get(notificationGroupId)).map(NotificationGroup::getName);
}
public Optional<NotificationGroupId> getIdByName(final NotificationGroupName name)
{
return getByName(name).m... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\impl\NotificationGroupMap.java | 1 |
请完成以下Java代码 | public void setBpmnModel(BpmnModel bpmnModel) {
this.bpmnModel = bpmnModel;
}
public ActivityBehaviorFactory getActivityBehaviorFactory() {
return activityBehaviorFactory;
}
public void setActivityBehaviorFactory(ActivityBehaviorFactory activityBehaviorFactory) {
this.activityB... | }
public FlowElement getCurrentFlowElement() {
return currentFlowElement;
}
public void setCurrentFlowElement(FlowElement currentFlowElement) {
this.currentFlowElement = currentFlowElement;
}
public Process getCurrentProcess() {
return currentProcess;
}
public voi... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\BpmnParse.java | 1 |
请完成以下Java代码 | public void postPurchaseCandidateUpdatedEvent(
@NonNull final I_C_PurchaseCandidate purchaseCandidateRecord,
@NonNull final ModelChangeType type)
{
final boolean isNewPurchaseCandidateRecord = type.isNew() || ModelChangeUtil.isJustActivated(purchaseCandidateRecord);
if (isNewPurchaseCandidateRecord)
{
r... | }
private MaterialDescriptor createMaterialDescriptor(@NonNull final I_C_PurchaseCandidate purchaseCandidateRecord)
{
final ProductDescriptor productDescriptor = productDescriptorFactory.createProductDescriptor(purchaseCandidateRecord);
final ProductId productId = ProductId.ofRepoId(purchaseCandidateRecord.getM... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\material\interceptor\C_PurchaseCandidate_PostMaterialEvent.java | 1 |
请完成以下Java代码 | public void deleteSelections(@NonNull final Set<String> selectionIds)
{
if (selectionIds.isEmpty())
{
return;
}
final SqlViewSelectionQueryBuilder viewQueryBuilder = newSqlViewSelectionQueryBuilder();
// Delete selection lines
{
final SqlAndParams sql = viewQueryBuilder.buildSqlDeleteSelectionLines... | rs = pstmt.executeQuery();
final ImmutableSet.Builder<DocumentId> rowIds = ImmutableSet.builder();
while (rs.next())
{
final DocumentId rowId = keyColumnNamesMap.retrieveRowId(rs, "", false);
if (rowId != null)
{
rowIds.add(rowId);
}
}
return rowIds.build();
}
catch (final SQLEx... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\SqlViewRowIdsOrderedSelectionFactory.java | 1 |
请完成以下Java代码 | public String getByteArrayValueId() {
return byteArrayField.getByteArrayId();
}
public byte[] getByteArrayValue() {
return byteArrayField.getByteArrayValue();
}
public void setByteArrayValue(byte[] bytes) {
byteArrayField.setByteArrayValue(bytes);
}
public String getName() {
return getVar... | + "[variableName=" + variableName
+ ", variableInstanceId=" + variableInstanceId
+ ", revision=" + revision
+ ", serializerName=" + serializerName
+ ", longValue=" + longValue
+ ", doubleValue=" + doubleValue
+ ", textValue=" + textValue
+ ", ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricDetailVariableInstanceUpdateEntity.java | 1 |
请完成以下Java代码 | public void setProcessInstance(ExecutionEntity processInstance) {
this.processInstance = processInstance;
this.processInstanceId = processInstance.getId();
}
public ProcessDefinitionEntity getProcessDef() {
if ((processDef == null) && (processDefId != null)) {
this.processDe... | if (groupId != null) {
sb.append(", groupId=").append(groupId);
}
if (taskId != null) {
sb.append(", taskId=").append(taskId);
}
if (processInstanceId != null) {
sb.append(", processInstanceId=").append(processInstanceId);
}
if (process... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\IdentityLinkEntityImpl.java | 1 |
请完成以下Java代码 | public JsonScannedBarcodeSuggestions getScannedBarcodeSuggestions(@NonNull GetScannedBarcodeSuggestionsRequest request)
{
final PickingJob pickingJob = getPickingJob(request.getWfProcess());
final PickingSlotSuggestions pickingSlotSuggestions = pickingJobRestService.getPickingSlotsSuggestions(pickingJob);
retur... | .collect(JsonScannedBarcodeSuggestions.collect());
}
private static JsonScannedBarcodeSuggestion toJson(final PickingSlotSuggestion pickingSlotSuggestion)
{
return JsonScannedBarcodeSuggestion.builder()
.caption(pickingSlotSuggestion.getCaption())
.detail(pickingSlotSuggestion.getDeliveryAddress())
.q... | repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\handlers\activity_handlers\SetPickingSlotWFActivityHandler.java | 1 |
请完成以下Java代码 | public void setProductValue (final @Nullable java.lang.String ProductValue)
{
throw new IllegalArgumentException ("ProductValue is virtual column"); }
@Override
public java.lang.String getProductValue()
{
return get_ValueAsString(COLUMNNAME_ProductValue);
}
@Override
public void setQtyLU (final @Nullable ... | final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyLU);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyTU (final @Nullable BigDecimal QtyTU)
{
set_Value (COLUMNNAME_QtyTU, QtyTU);
}
@Override
public BigDecimal getQtyTU()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLU... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\shipping\model\X_M_ShippingPackage.java | 1 |
请完成以下Java代码 | public final String getPIName()
{
final I_M_HU hu = getM_HU();
final String piNameRaw;
if (handlingUnitsBL.isAggregateHU(hu))
{
piNameRaw = getAggregateHuPiName(hu);
}
else
{
final I_M_HU_PI pi = handlingUnitsBL.getPI(hu);
piNameRaw = pi != null ? pi.getName() : "?";
}
return escape(piName... | return "?";
}
final I_M_HU_PI included_HU_PI = handlingUnitsBL.getPI(includedPIId);
return included_HU_PI.getName();
}
// NOTE: this method can be overridden by extending classes in order to optimize how the HUs are counted.
@Override
public int getIncludedHUsCount()
{
// NOTE: we need to iterate the HU... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUDisplayNameBuilder.java | 1 |
请完成以下Java代码 | boolean is_tree_travel(int now, List<List<Integer>> tree, boolean visited[])
{
if (visited[now])
{
return false;
}
visited[now] = true;
for (int c = 0; c < tree.get(now).size(); ++c)
{
int next = tree.get(now).get(c);
if (!is_tree_t... | {
return true;
}
}
}
else
{
for (int from = modifier + 1; from < head; ++from)
{
int to = heads.get(from);
if (to < modifier || to > head)
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\nnparser\Instance.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.