instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public void play() { GolfTournament golfTournament = this.golfTournament; if (isNotFinished(golfTournament)) { playHole(golfTournament); finish(golfTournament); } } // end::play[] private synchronized void playHole(@NonNull GolfTournament golfTournament) { GolfCourse golfCourse = golfTournament.get...
} private int calculateFinalScore(@Nullable Integer scoreRelativeToPar) { int finalScore = scoreRelativeToPar != null ? scoreRelativeToPar : 0; int parForCourse = getGolfTournament() .map(GolfTournament::getGolfCourse) .map(GolfCourse::getParForCourse) .orElse(GolfCourse.STANDARD_PAR_FOR_COURSE); re...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\service\PgaTourService.java
2
请完成以下Java代码
public int getAPI_Request_Audit_ID() { return get_ValueAsInt(COLUMNNAME_API_Request_Audit_ID); } @Override public void setAPI_Request_Audit_Log_ID (final int API_Request_Audit_Log_ID) { if (API_Request_Audit_Log_ID < 1) set_ValueNoCheck (COLUMNNAME_API_Request_Audit_Log_ID, null); else set_ValueNoC...
return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setTrxName (final @Nullable java.lang.String TrxName) { set_Value (COLUMNNAME_TrxName, TrxName); } @Override public java.lang.String getTrxName() { return get_ValueAsString(COLUMNNAME_TrxName); } /** * Type AD_Reference_ID=541329 ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_API_Request_Audit_Log.java
1
请完成以下Java代码
public boolean isApplyHandler(final I_C_Printing_Queue queueItem, final I_AD_Archive IGNORED) { if (queueItem.getAD_User_ID() <= 0) { return false; } // return true if the item's user has a C_Printing_Queue_Recipient final I_AD_User queueUser = Services.get(IUserDAO.class).getByIdInTrx(UserId.ofRepoId(q...
private void resetToUserPrintingQueueRecipient(final I_C_Printing_Queue queueItem) { final I_AD_User itemUser = Services.get(IUserDAO.class).getByIdInTrx(UserId.ofRepoId(queueItem.getAD_User_ID()), I_AD_User.class); final int userToPrintId = getEffectiveUserToPrint(itemUser, new HashSet<>()).getAD_User_ID(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\spi\impl\C_Printing_Queue_RecipientHandler.java
1
请完成以下Java代码
public int getMobileUI_UserProfile_Picking_ID() { return get_ValueAsInt(COLUMNNAME_MobileUI_UserProfile_Picking_ID); } /** * PickingJobField AD_Reference_ID=541850 * Reference name: PickingJobField_Options */ public static final int PICKINGJOBFIELD_AD_Reference_ID=541850; /** DocumentNo = DocumentNo */ ...
} @Override public int getPickingProfile_PickingJobConfig_ID() { return get_ValueAsInt(COLUMNNAME_PickingProfile_PickingJobConfig_ID); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\picking\model\X_PickingProfile_PickingJobConfig.java
1
请在Spring Boot框架中完成以下Java代码
public Date getLockTime() { return lockTime; } @Override public void setLockTime(Date lockTime) { this.lockTime = lockTime; } @Override public String getLockOwner() { return lockOwner; } @Override public void setLockOwner(String lockOwner) { this.lo...
return true; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName().replace("EntityImpl", "")).append("[") .append("id=").append(id) .append(", eventType=").append(eventType); if (activityI...
repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\impl\persistence\entity\EventSubscriptionEntityImpl.java
2
请在Spring Boot框架中完成以下Java代码
public Shipping createShipping(Order order) { var provider = selectProvider(order); return new Shipping( order, provider, ShippingStatus.CREATED, List.of(new ShippingEvent( clock.instant(), ShippingStatus.CREATED, "Shipping crea...
if ( totalItems < 5) { return ShippingProvider.DHL; } else if ( totalItems < 10) { return ShippingProvider.FedEx; } else { return ShippingProvider.UPS; } } public Shipping updateStatus(Shipping shipping, ShippingStatus status) { ...
repos\tutorials-master\saas-modules\temporal\src\main\java\com\baeldung\temporal\workflows\sboot\order\services\ShippingService.java
2
请在Spring Boot框架中完成以下Java代码
public void markBankStatementLinesAsProcessed(final BankStatementId bankStatementId) { final boolean processed = true; bankStatementDAO.updateBankStatementLinesProcessedFlag(bankStatementId, processed); } public void deleteFactsForBankStatement(final I_C_BankStatement bankStatement) { factAcctDAO.deleteForDo...
public String getMsg(final AdMessageKey adMessage) { return msgBL.getMsg(Env.getCtx(), adMessage); } public String getMsg(final Properties ctx, final AdMessageKey adMessage) { return msgBL.getMsg(ctx, adMessage); } public String translate(final Properties ctx, final String adMessageOrColumnName) { return...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\service\BankStatementDocumentHandlerRequiredServicesFacade.java
2
请在Spring Boot框架中完成以下Java代码
public PackagingIdentificationType getPackagingIdentification() { return packagingIdentification; } /** * Sets the value of the packagingIdentification property. * * @param value * allowed object is * {@link PackagingIdentificationType } * */ public ...
* possible object is * {@link ForecastListLineItemExtensionType } * */ public ForecastListLineItemExtensionType getForecastListLineItemExtension() { return forecastListLineItemExtension; } /** * Sets the value of the forecastListLineItemExtension property. * ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ForecastListLineItemType.java
2
请完成以下Java代码
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.get...
if (processInstanceId != null){ referenceIdAndClass.put(processInstanceId, ExecutionEntity.class); } if (executionId != null){ referenceIdAndClass.put(executionId, ExecutionEntity.class); } if (caseInstanceId != null){ referenceIdAndClass.put(caseInstanceId, CaseExecutionEntity.class);...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\VariableInstanceEntity.java
1
请完成以下Java代码
public class HistoricBatchQueryImpl extends AbstractQuery<HistoricBatchQuery, HistoricBatch> implements HistoricBatchQuery { private static final long serialVersionUID = 1L; protected String batchId; protected String type; protected Boolean completed; protected boolean isTenantIdSet = false; protected Str...
} public HistoricBatchQuery orderByStartTime() { return orderBy(HistoricBatchQueryProperty.START_TIME); } public HistoricBatchQuery orderByEndTime() { return orderBy(HistoricBatchQueryProperty.END_TIME); } @Override public HistoricBatchQuery orderByTenantId() { return orderBy(HistoricBatchQue...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
private TransactionResult handleResult(final OrderId orderId, @NonNull final BPartnerId bPartnerId, @NonNull final CreditPassConfig config, @NonNull final CreditScore creditScore) { final CreditScore finalCreditScore = convertResult(config, creditScore); final TransactionResult result = transactionResultService...
.converted(true) .build(); } return creditScore; } private void sendNotification(@NonNull final CreditPassConfig config, @NonNull final TransactionResultId transactionResultId) { final String message = Services.get(IMsgBL.class).getMsg(Env.getCtx(), CreditPassConstants.CREDITPASS_NOTIFICATION_MESSAGE_KEY...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java\de\metas\vertical\creditscore\creditpass\service\CreditPassTransactionService.java
2
请完成以下Java代码
public class TbGetTelemetryNodeConfiguration implements NodeConfiguration<TbGetTelemetryNodeConfiguration> { public static final int MAX_FETCH_SIZE = 1000; private int startInterval; private int endInterval; private String startIntervalPattern; private String endIntervalPattern; private bool...
@Override public TbGetTelemetryNodeConfiguration defaultConfiguration() { TbGetTelemetryNodeConfiguration configuration = new TbGetTelemetryNodeConfiguration(); configuration.setLatestTsKeyNames(Collections.emptyList()); configuration.setFetchMode(FetchMode.FIRST); configuration.setS...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\metadata\TbGetTelemetryNodeConfiguration.java
1
请完成以下Java代码
public static void replaceOne() { Document replaceDocument = new Document(); replaceDocument.append("student_id", 8764) .append("student_name", "Paul Starc") .append("address", "Hostel 3") .append("age", 18) .append("roll_no", 199406); UpdateResu...
mongoClient = MongoClients.create("mongodb://localhost:27017"); database = mongoClient.getDatabase("baeldung"); collection = database.getCollection("student"); } } public static void main(String[] args) { // // Connect to cluster (default is localhost:27017) ...
repos\tutorials-master\persistence-modules\java-mongodb\src\main\java\com\baeldung\mongo\update\UpdateFields.java
1
请完成以下Java代码
protected boolean getEnableAuthorities() { return this.enableAuthorities; } /** * Enables loading of authorities (roles) from the authorities table. Defaults to true */ public void setEnableAuthorities(boolean enableAuthorities) { this.enableAuthorities = enableAuthorities; } protected boolean getEnableG...
} @Override public void setMessageSource(MessageSource messageSource) { Assert.notNull(messageSource, "messageSource cannot be null"); this.messages = new MessageSourceAccessor(messageSource); } private JdbcTemplate getJdbc() { JdbcTemplate template = getJdbcTemplate(); Assert.notNull(template, "JdbcTempl...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\userdetails\jdbc\JdbcDaoImpl.java
1
请完成以下Java代码
private Method getMainMethod(Thread thread) { StackTraceElement[] stackTrace = thread.getStackTrace(); for (int i = stackTrace.length - 1; i >= 0; i--) { StackTraceElement element = stackTrace[i]; if ("main".equals(element.getMethodName()) && !isLoaderClass(element.getClassName())) { Method method = getMa...
/** * Returns the actual main method. * @return the main method */ Method getMethod() { return this.method; } /** * Return the name of the declaring class. * @return the declaring class name */ String getDeclaringClassName() { return this.method.getDeclaringClass().getName(); } }
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\restart\MainMethod.java
1
请完成以下Java代码
public ValueExpression resolveVariable(String variableName) { int scope = scriptContext.getAttributesScope(variableName); if (scope != -1) { Object value = scriptContext.getAttribute(variableName, scope); if (value instanceof ValueExpression) { ...
ScriptContextFunctionMapper(ScriptContext ctx) { this.scriptContext = ctx; } private String getFullFunctionName(String prefix, String localName) { return prefix + ":" + localName; } @Override public Method resolveFunction(String prefix, String localName)...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\scripting\JuelScriptEngine.java
1
请完成以下Java代码
public class ListAndSetAddBenchmark { public static void main(String[] args) throws IOException, RunnerException { Options opt = new OptionsBuilder() .include(ListAndSetAddBenchmark.class.getSimpleName()) .forks(1) .addProfiler("gc") .build(); new Runner(opt)...
@Benchmark public void addElementToHashSet(Params param, Blackhole blackhole) { param.hashSet.clear(); for (int i = 0; i < param.addNumber; i++) { blackhole.consume(param.hashSet.add(i)); } } @State(Scope.Benchmark) public static class Params { public int add...
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\listandset\benchmark\ListAndSetAddBenchmark.java
1
请完成以下Java代码
public Map<ProductId, Product> retrieveProductsByIds(final Set<ProductId> productIds) { final ImmutableList<Product> products = productRepository.getByIds(productIds); return Maps.uniqueIndex(products, Product::getId); } public I_C_UOM getUomById(final UomId uomId) { return uomsCache.computeIfAbsent(uomId, u...
CollectionUtils.getAllOrLoad(uomsCache, uomIds, this::retrieveUOMsByIds); } private Map<UomId, I_C_UOM> retrieveUOMsByIds(final Collection<UomId> uomIds) { final List<I_C_UOM> uoms = uomDAO.getByIds(uomIds); return Maps.uniqueIndex(uoms, uom -> UomId.ofRepoId(uom.getC_UOM_ID())); } public ImmutableSet<Wareho...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\MaterialCockpitRowCache.java
1
请完成以下Java代码
protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) { EndEvent endEvent = (EndEvent) baseElement; addEventProperties(endEvent, propertiesNode); } protected FlowElement convertJsonToElement( JsonNode elementNode, JsonNode modelNode, Map...
String terminateAllStringValue = getPropertyValueAsString(PROPERTY_TERMINATE_ALL, elementNode); if (StringUtils.isNotEmpty(terminateAllStringValue)) { eventDefinition.setTerminateAll("true".equals(terminateAllStringValue)); } String terminateMiStringValue = getProper...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\EndEventJsonConverter.java
1
请完成以下Java代码
public class X_HR_ListType extends PO implements I_HR_ListType, I_Persistent { /** * */ private static final long serialVersionUID = 20090915L; /** Standard Constructor */ public X_HR_ListType (Properties ctx, int HR_ListType_ID, String trxName) { super (ctx, HR_ListType_ID, trxName); /...
} /** Get Payroll List Type. @return Payroll List Type */ public int getHR_ListType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListType_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_ListType.java
1
请完成以下Java代码
private PrintingClient createPrintingClient() { final Context ctx = Context.getContext(); ctx.addSource(new EnvContext()); ctx.addSource(new SysConfigContext()); // the swing client can always use the loopback endpoint, as it has direct (DB-)access to the server ctx.setProperty(Context.CTX_PrintConnectionE...
@Override public void stop() { client.stop(); } @Override public void destroy() { if (client != null) { client.destroy(); } client = null; } @Override public void restart() { stop(); start(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.embedded-client\src\main\java\de\metas\printing\client\impl\PrintingClientDelegate.java
1
请完成以下Java代码
public class Order { private UUID id; private Type type; private int internalAudit; public static class Type { public long id; public String name; } public Order() { this.id = UUID.randomUUID(); } public Order(Type type) { this(); this.type = t...
this.type.name = "Order"; this.internalAudit = internalAudit; } public UUID getId() { return id; } public Type getType() { return type; } public void setType(Type type) { this.type = type; } }
repos\tutorials-master\video-tutorials\jackson-annotations-video\src\main\java\com\baeldung\jacksonannotation\domain\Order.java
1
请完成以下Java代码
public static boolean checkLuhn(String cardNumber) { int sum = 0; try { for (int i = cardNumber.length() - 1; i >= 0; i--) { int digit = Integer.parseInt(cardNumber.substring(i, i + 1)); if ((cardNumber.length() - i) % 2 == 0) { digit = d...
* starting with a single digit) 0-4 -> produce single digit when doubled * 5*2 = 10 -> 1+0 = 1 = 10-9 * 6*2 = 12 -> 1+3 = 3 = 12-9 * 7*2 = 14 -> 1+5 = 5 = 14-9 * 8*2 = 16 -> 1+7 = 7 = 16-9 * 9*2 = 18 -> 1+9 = 9 = 18-9 */ public static int doubleAndSumDigits(int digit) { int ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-7\src\main\java\com\baeldung\algorithms\luhn\LuhnChecker.java
1
请完成以下Java代码
public final class GenerateOneTimeTokenFilter extends OncePerRequestFilter { public static final String DEFAULT_GENERATE_URL = "/ott/generate"; private final OneTimeTokenService tokenService; private final OneTimeTokenGenerationSuccessHandler tokenGenerationSuccessHandler; private RequestMatcher requestMatcher ...
* Use the given {@link RequestMatcher} to match the request. * @param requestMatcher */ public void setRequestMatcher(RequestMatcher requestMatcher) { Assert.notNull(requestMatcher, "requestMatcher cannot be null"); this.requestMatcher = requestMatcher; } /** * Use the given {@link GenerateOneTimeTokenReq...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\ott\GenerateOneTimeTokenFilter.java
1
请完成以下Java代码
public static void stop() throws IOException { client.close(); buffer = null; } private EchoClient() { try { client = SocketChannel.open(new InetSocketAddress("localhost", 5454)); buffer = ByteBuffer.allocate(256); } catch (IOException e) { e....
String response = null; try { client.write(buffer); buffer.clear(); client.read(buffer); response = new String(buffer.array()).trim(); System.out.println("response=" + response); buffer.clear(); } catch (IOException e) { ...
repos\tutorials-master\core-java-modules\core-java-nio\src\main\java\com\baeldung\selector\EchoClient.java
1
请完成以下Java代码
private void setCollapsed(boolean collapsed) { warehouseStockPanel.setCollapsed(collapsed); } public java.awt.Component getComponent() { return warehouseStockPanel; } /** * Wrapper class for each of the detail tabs. * * @author ad * */ private class InfoProductDetailTab { private final IInfoP...
final boolean onlyIfStale = false; refresh(onlyIfStale, M_Product_ID, M_Warehouse_ID, M_AttributeSetInstance_ID, M_PriceList_Version_ID); } /** * Refresh only if stale */ private void refreshIfStale() { final int M_Product_ID = getM_Product_ID(); final int M_Warehouse_ID = getM_Warehouse_ID(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoProductDetails.java
1
请完成以下Java代码
public boolean equals(Object obj) { if (obj != null && obj.getClass() == getClass()) { ObjectValueExpression other = (ObjectValueExpression) obj; if (type != other.type) { return false; } return (object == other.object || (object != null && object....
/** * Answer <code>null</code>. */ @Override public Class<?> getType(ELContext context) { return null; } /** * Answer <code>true</code>. */ @Override public boolean isReadOnly(ELContext context) { return true; } /** * Throw an exception. */...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\ObjectValueExpression.java
1
请完成以下Java代码
public Builder setBestBeforeDate(final LocalDate bestBeforeDate) { this.bestBeforeDate = bestBeforeDate; return this; } private LocalDate getBestBeforeDate() { return bestBeforeDate; } public Builder setLocator(final LocatorId locatorId, final String locatorCaption) { this.locatorId = locato...
public Builder setClearanceStatus(@Nullable final JSONLookupValue clearanceStatusLookupValue) { clearanceStatus = clearanceStatusLookupValue; return this; } public Builder setCustomProcessApplyPredicate(@Nullable final BiPredicate<HUEditorRow, ProcessDescriptor> processApplyPredicate) { this.customPro...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRow.java
1
请完成以下Java代码
public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setProcessing (final boolean Processing) { set_Value (COLUMNNAME_Processing, Processing)...
/** * Type AD_Reference_ID=540263 * Reference name: C_Flatrate_DataEntry Type */ public static final int TYPE_AD_Reference_ID=540263; /** Invoicing_PeriodBased = IP */ public static final String TYPE_Invoicing_PeriodBased = "IP"; /** Correction_PeriodBased = CP */ public static final String TYPE_Correction_...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_DataEntry.java
1
请完成以下Java代码
public void QueryJPQL() { PersistenceManagerFactory pmf = new JDOPersistenceManagerFactory(pumd, null); PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); // JPQL : LOGGER.log(Level.INFO, "...
if (tx.isActive()) { tx.rollback(); } pm.close(); } } @SuppressWarnings({ "rawtypes", "unchecked" }) public void listXMLProducts() { PersistenceManagerFactory pmf = new JDOPersistenceManagerFactory(pumdXML, null); PersistenceManager pm = pmf.g...
repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\jdo\GuideToJDO.java
1
请完成以下Java代码
public class ShareRecordMessagingMessageListenerAdapter<K, V> extends MessagingMessageListenerAdapter<K, V> implements AcknowledgingShareConsumerAwareMessageListener<K, V> { public ShareRecordMessagingMessageListenerAdapter(@Nullable Object bean, @Nullable Method method, @Nullable KafkaListenerErrorHandler error...
} else { message = NULL_MESSAGE; } if (logger.isDebugEnabled()) { RecordMessageConverter messageConverter = getMessageConverter(); if (!(messageConverter instanceof JacksonProjectingMessageConverter || messageConverter instanceof org.springframework.kafka.support.converter.ProjectingMessageConverter...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\ShareRecordMessagingMessageListenerAdapter.java
1
请在Spring Boot框架中完成以下Java代码
public String delPmsMenu(HttpServletRequest req, Long menuId, Model model, DwzAjax dwz) { try { if (menuId == null || menuId == 0) { return operateError("无法获取要删除的数据", model); } PmsMenu menu = pmsMenuService.getById(menuId); if (menu == null) { return operateError("无法获取要删除的数据", model); } Long...
// 此时要将父菜单设为叶子 PmsMenu parent = pmsMenuService.getById(parentId); parent.setIsLeaf(PublicEnum.YES.name()); pmsMenuService.update(parent); } // 记录系统操作日志 return operateSuccess(model, dwz); } catch (Exception e) { // 记录系统操作日志 log.error("== delPmsMenu exception:", e); return operateError("删除...
repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\permission\controller\PmsMenuController.java
2
请完成以下Java代码
public class Main { public static void main(String[] args) { final List<Runnable> actions = new ArrayList<Runnable>(2); Runnable action = new Runnable() { @Override public void run() { System.out.println("Hello from runnable."); } }; ...
int count = 1; Runnable action2 = new Runnable() { static final int x = 0; // static int y = 0; @Override public void run() { System.out.println(String.format("Runnable with captured variables: count = %s, x = %s", count, x)); } ...
repos\tutorials-master\core-java-modules\core-java-lang-oop-inheritance\src\main\java\com\baeldung\anonymous\Main.java
1
请完成以下Java代码
public void setR_IssueUser_ID (int R_IssueUser_ID) { if (R_IssueUser_ID < 1) set_ValueNoCheck (COLUMNNAME_R_IssueUser_ID, null); else set_ValueNoCheck (COLUMNNAME_R_IssueUser_ID, Integer.valueOf(R_IssueUser_ID)); } /** Get IssueUser. @return User who reported issues */ public int getR_IssueUser_ID...
/** Get Registered EMail. @return Email of the responsible for the System */ public String getUserName () { return (String)get_Value(COLUMNNAME_UserName); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNameP...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueUser.java
1
请在Spring Boot框架中完成以下Java代码
public class AuthController { private Validator validator; private UserDao userDao; private Result result; private UserInfo userInfo; private Logger logger = Logger.getLogger(getClass().getName()); public AuthController() { this(null, null, null, null); } @Inject public Au...
Object resp = userDao.add(user); if(resp != null) { result.include("status", "Registration Successful! Now Login"); result.redirectTo(this).loginForm(); } else { result.include("error", "There was an error during registration"); result.redirectTo(this).re...
repos\tutorials-master\web-modules\vraptor\src\main\java\com\baeldung\controllers\AuthController.java
2
请完成以下Java代码
public class WEBUI_ProductsProposal_AddProductFromBasePriceList extends ProductsProposalViewBasedProcess { @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (getSelectedRowIds().isEmpty()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } return Pr...
.collect(ImmutableList.toImmutableList()); initialView.addOrUpdateRows(addRequests); } private ProductsProposalRowAddRequest toProductsProposalRowAddRequest(final ProductsProposalRow row) { return ProductsProposalRowAddRequest.builder() .product(row.getProduct()) .asiDescription(row.getAsiDescription()...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\process\WEBUI_ProductsProposal_AddProductFromBasePriceList.java
1
请完成以下Java代码
public static FreightCostRule ofNullableCode(@Nullable final String code) { final FreightCostRule defaultWhenNull = null; return ofNullableCodeOr(code, defaultWhenNull); } @Nullable public static FreightCostRule ofNullableCodeOr(@Nullable final String code, @Nullable final FreightCostRule defaultWhenNull) { ...
public boolean isFixPrice() { return this == FixPrice; } public boolean isNotFixPrice() { return !isFixPrice(); } @Nullable public static String toCodeOrNull(final FreightCostRule type) { return type != null ? type.getCode() : null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\freighcost\FreightCostRule.java
1
请完成以下Java代码
public void setAD_Issue_ID (final int AD_Issue_ID) { if (AD_Issue_ID < 1) set_Value (COLUMNNAME_AD_Issue_ID, null); else set_Value (COLUMNNAME_AD_Issue_ID, AD_Issue_ID); } @Override public int getAD_Issue_ID() { return get_ValueAsInt(COLUMNNAME_AD_Issue_ID); } @Override public void setConfigSum...
{ set_Value (COLUMNNAME_DurationMillis, DurationMillis); } @Override public int getDurationMillis() { return get_ValueAsInt(COLUMNNAME_DurationMillis); } @Override public void setIsError (final boolean IsError) { set_Value (COLUMNNAME_IsError, IsError); } @Override public boolean isError() { re...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java-gen\de\metas\shipper\gateway\dhl\model\X_Dhl_ShipmentOrder_Log.java
1
请完成以下Java代码
public void setStorageAttributesKey (final java.lang.String StorageAttributesKey) { set_Value (COLUMNNAME_StorageAttributesKey, StorageAttributesKey); } @Override public java.lang.String getStorageAttributesKey() { return get_ValueAsString(COLUMNNAME_StorageAttributesKey); } @Override public void setUserE...
@Override public java.lang.String getUserElementString4() { return get_ValueAsString(COLUMNNAME_UserElementString4); } @Override public void setUserElementString5 (final @Nullable java.lang.String UserElementString5) { set_Value (COLUMNNAME_UserElementString5, UserElementString5); } @Override public java...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java-gen\de\metas\material\dispo\model\X_MD_Candidate.java
1
请完成以下Java代码
protected void registerInterceptors(final IModelValidationEngine engine) { engine.addModelValidator(C_Flatrate_Conditions.INSTANCE); engine.addModelValidator(C_SubscriptionProgress.instance); engine.addModelValidator(C_Flatrate_DataEntry.instance); engine.addModelValidator(C_Flatrate_Matching.instance); engi...
// 03742 engine.addModelValidator(new C_Flatrate_Transition()); // 04360 engine.addModelValidator(new C_Period()); engine.addModelValidator(new M_InOutLine()); engine.addModelValidator(new M_ShipmentSchedule_QtyPicked()); // 09869 engine.addModelValidator(M_ShipmentSchedule.INSTANCE); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\interceptor\MainValidator.java
1
请完成以下Java代码
public class AlfrescoStartEvent extends StartEvent { protected String runAs; protected String scriptProcessor; public String getRunAs() { return runAs; } public void setRunAs(String runAs) { this.runAs = runAs; } public String getScriptProcessor() { return scriptP...
this.scriptProcessor = scriptProcessor; } public AlfrescoStartEvent clone() { AlfrescoStartEvent clone = new AlfrescoStartEvent(); clone.setValues(this); return clone; } public void setValues(AlfrescoStartEvent otherElement) { super.setValues(otherElement); setR...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\alfresco\AlfrescoStartEvent.java
1
请在Spring Boot框架中完成以下Java代码
public void setDescription(String description) { this.description = description; } public void setDiagramResource(String diagramResource) { this.diagramResource = diagramResource; } @ApiModelProperty(example = "http://localhost:8182/cmmn-repository/deployments/2/resources/testProcess.p...
} @ApiModelProperty(value = "Indicates the case definition contains graphical information (CMMN DI).") public boolean isGraphicalNotationDefined() { return graphicalNotationDefined; } public void setStartFormDefined(boolean startFormDefined) { this.startFormDefined = startFormDefined; ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\CaseDefinitionResponse.java
2
请完成以下Java代码
public class Car { private final int DEFAULT_WHEEL_COUNT = 5; private final String DEFAULT_MODEL = "Basic"; protected int wheels; protected String model; public Car() { this.wheels = DEFAULT_WHEEL_COUNT; this.model = DEFAULT_MODEL; } public Car(int wheels, String model) { th...
} public void start() { // Check essential parts // If okay, start. } public static int count = 10; public static String msg() { return "Car"; } public String toString() { return model; } }
repos\tutorials-master\core-java-modules\core-java-lang-oop-inheritance-2\src\main\java\com\baeldung\inheritance\Car.java
1
请完成以下Java代码
protected PvmExecutionImpl eventNotificationsStarted(PvmExecutionImpl execution) { execution.incrementSequenceCounter(); // hack around execution tree structure not being in sync with activity instance concept: // if we end a scope activity, take remembered activity instance from parent and set on // e...
return execution; } @Override protected void eventNotificationsFailed(PvmExecutionImpl execution, Exception e) { execution.activityInstanceEndListenerFailure(); super.eventNotificationsFailed(execution, e); } @Override protected boolean isSkipNotifyListeners(PvmExecutionImpl execution) { // l...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationActivityInstanceEnd.java
1
请完成以下Java代码
public String toString() { return toStringValue; } @Override public String getFormatedExpressionString() { return expressionString; } @Override public Boolean evaluate(final Evaluatee ctx, final boolean ignoreUnparsable) { return value; } @Override public Boolean evaluate(final Evaluatee ctx, final...
{ return value; } @Override public LogicExpressionResult evaluateToResult(final Evaluatee ctx, final OnVariableNotFound onVariableNotFound) throws ExpressionEvaluationException { return value ? LogicExpressionResult.TRUE : LogicExpressionResult.FALSE; } @Override public ILogicExpression evaluatePartial(fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\ConstantLogicExpression.java
1
请在Spring Boot框架中完成以下Java代码
public void setDataKeyId(BsonBinary dataKeyId) { this.dataKeyId = dataKeyId; } public BsonBinary getDataKeyId() { return dataKeyId; } public String getKeyVaultNamespace() { return keyVaultNamespace; } public String getKeyVaultAlias() { return keyVaultAlias; ...
} public boolean isAutoEncryption() { return autoEncryption; } public File getAutoEncryptionLib() { return autoEncryptionLib; } public String dataKeyIdUuid() { if (dataKeyId == null) throw new IllegalStateException("data key not initialized"); return d...
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-3\src\main\java\com\baeldung\boot\csfle\config\EncryptionConfig.java
2
请在Spring Boot框架中完成以下Java代码
IntegrationFlow inboundProcess(FlowableInboundGateway inboundGateway) { return IntegrationFlow .from(inboundGateway) .handle(new GenericHandler<DelegateExecution>() { @Override public Object handle(DelegateExecution execution, MessageHeader...
final AnalysingService analysingService, final RuntimeService runtimeService) { return new CommandLineRunner() { @Override public void run(String... strings) throws Exception { String integrationGatewayProcess = "integrationGatewayProcess"; r...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-samples\flowable-spring-boot-sample-integration\src\main\java\flowable\Application.java
2
请在Spring Boot框架中完成以下Java代码
public long getDateTimeIntervalEndTs(ZonedDateTime dateTime) { long offset = getOffsetSafe(); ZonedDateTime shiftedNow = dateTime.minusSeconds(offset); ZonedDateTime alignedEnd = getAlignedBoundary(shiftedNow, true); ZonedDateTime actualEnd = alignedEnd.plusSeconds(offset); retur...
getZoneId(); } catch (Exception ex) { throw new IllegalArgumentException("Invalid timezone in interval: " + ex.getMessage()); } if (offsetSec != null) { if (offsetSec < 0) { throw new IllegalArgumentException("Offset cannot be negative."); } ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\cf\configuration\aggregation\single\interval\BaseAggInterval.java
2
请在Spring Boot框架中完成以下Java代码
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final H130 other = (H130)obj; if (deliveryTermCode == null) { if (other.deliveryTermCode != null) { return false;...
{ return false; } } else if (!payTimeNetto.equals(other.payTimeNetto)) { return false; } if (payTimeSkonto == null) { if (other.payTimeSkonto != null) { return false; } } else if (!payTimeSkonto.equals(other.payTimeSkonto)) { return false; } if (record == null) { if ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\ordersimport\compudata\H130.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .add("qtyReportEvent", qtyReportEvent) .toString(); } @Override public Properties getCtx() { return InterfaceWrapperHelper.getCtx(qtyReportEvent); } @Override public I_C_BPartner getC_BPartner() { return qtyReportEvent.getC_BPa...
@Override public Timestamp getDate() { return qtyReportEvent.getDatePromised(); } @Override public BigDecimal getQty() { return qtyReportEvent.getQtyPromised(); } @Override public void setM_PricingSystem_ID(final int M_PricingSystem_ID) { qtyReportEvent.setM_PricingSystem_ID(M_PricingSystem_ID); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\PMMPricingAware_QtyReportEvent.java
1
请在Spring Boot框架中完成以下Java代码
public JpaItemWriter<Customer> jpaDBWriter(EntityManagerFactory entityManagerFactory) { JpaItemWriter<Customer> writer = new JpaItemWriter<>(); writer.setEntityManagerFactory(entityManagerFactory); return writer; } @Bean public FlatFileItemWriter<Customer> fileWriter() { ret...
public Step processCustomersStep(JobRepository jobRepository, PlatformTransactionManager transactionManager, FlatFileItemReader<Customer> reader, CustomerProcessorRouter processorRouter, CompositeItemWriter<Customer> compositeWriter) { return new StepBuilder("processCustomersStep", jobRepository).<Custo...
repos\tutorials-master\spring-batch-2\src\main\java\com\baeldung\multiprocessorandwriter\config\BatchConfig.java
2
请在Spring Boot框架中完成以下Java代码
class ApplicationConfiguration { @Bean ReactiveTenantExtension tenantExtension() { return ReactiveTenantExtension.INSTANCE; } /** * Extension that looks up a {@link Tenant} from the {@link reactor.util.context.Context}. */ enum ReactiveTenantExtension implements ReactiveEvaluationContextExtension { INST...
} @Override public Tenant getRootObject() { return tenant; } } /** * The root object. */ @Value public static class Tenant { String tenantId; } }
repos\spring-data-examples-main\cassandra\reactive\src\main\java\example\springdata\cassandra\spel\ApplicationConfiguration.java
2
请完成以下Java代码
public int getOrder() { return WRITE_RESPONSE_FILTER_ORDER; } @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { // NOTICE: nothing in "pre" filter stage as CLIENT_RESPONSE_CONN_ATTR is not added // until the NettyRoutingFilter is run // @formatter:off return chain....
.doFinally(signalType -> { if (signalType == SignalType.CANCEL || signalType == SignalType.ON_ERROR) { cleanup(exchange); } }); // @formatter:on } protected DataBuffer wrap(ByteBuf byteBuf, ServerHttpResponse response) { DataBufferFactory bufferFactory = response.bufferFactory(); if (buffer...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\NettyWriteResponseFilter.java
1
请完成以下Java代码
public List<String> getCustomMybatisXMLMappers() { return customMybatisXMLMappers; } public void setCustomMybatisXMLMappers(List<String> customMybatisXMLMappers) { this.customMybatisXMLMappers = customMybatisXMLMappers; } public boolean isUseStrongUuids() { return useStrongUuid...
this.javaClassFieldForJackson = javaClassFieldForJackson; } public Integer getProcessDefinitionCacheLimit() { return processDefinitionCacheLimit; } public void setProcessDefinitionCacheLimit(Integer processDefinitionCacheLimit) { this.processDefinitionCacheLimit = processDefinitionCach...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\ActivitiProperties.java
1
请完成以下Java代码
public Map<String, CaseElement> getAllCaseElements() { return allCaseElements; } public void setAllCaseElements(Map<String, CaseElement> allCaseElements) { this.allCaseElements = allCaseElements; } public <T extends PlanItemDefinition> List<T> findPlanItemDefinitionsOfType(Class<T> typ...
public void setReactivateEventListener(ReactivateEventListener reactivateEventListener) { this.reactivateEventListener = reactivateEventListener; } @Override public List<FlowableListener> getLifecycleListeners() { return this.lifecycleListeners; } @Override public void setLifec...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Case.java
1
请完成以下Java代码
public class ShipmentServiceTestImpl implements IShipmentService { @NonNull private final IHUShipmentScheduleBL huShipmentScheduleBL = Services.get(IHUShipmentScheduleBL.class); @NonNull private final ShipmentScheduleWithHUService shipmentScheduleWithHUService; @NonNull private final PickingJobScheduleService pickin...
return ImmutableSet.of(); } final List<ShipmentScheduleWithHU> shipmentScheduleWithHUS = shipmentScheduleWithHUService.prepareShipmentSchedulesWithHU( PrepareForShipmentSchedulesRequest.builder() .schedules(pickingJobScheduleService.getShipmentScheduleAndJobSchedulesCollection(scheduleIds)) .quanti...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\impl\ShipmentServiceTestImpl.java
1
请完成以下Java代码
public void addStockRecord(@NonNull final I_MD_Stock stockRecord) { final ProductId productId = ProductId.ofRepoId(stockRecord.getM_Product_ID()); final I_C_UOM uom = cache.getUomByProductId(productId); qtyOnHandStock = addToNullable(qtyOnHandStock, stockRecord.getQtyOnHand(), uom); stockRecordIds.add(stockR...
return MaterialCockpitRow.countingSubRowBuilder() .lookups(rowLookups) .cache(cache) .date(productIdAndDate.getDate()) .productId(productIdAndDate.getProductId().getRepoId()) .detailsRowAggregationIdentifier(detailsRowAggregationIdentifier) .qtyDemandSalesOrder(qtyDemandSalesOrder) .qtySuppl...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\rowfactory\CountingSubRowBucket.java
1
请完成以下Java代码
private static MobileApplicationPermission fromRecord( @NonNull final I_Mobile_Application_Access applicationAccess, @NonNull final ImmutableListMultimap<MobileApplicationRepoId, I_Mobile_Application_Action_Access> actionAccessByMobileApplicationId) { final MobileApplicationRepoId mobileApplicationId = MobileA...
.firstOnly(I_Mobile_Application_Access.class); if (accessRecord == null) { accessRecord = InterfaceWrapperHelper.newInstance(I_Mobile_Application_Access.class); InterfaceWrapperHelper.setValue(accessRecord, I_Mobile_Application_Access.COLUMNNAME_AD_Client_ID, request.getClientId().getRepoId()); accessReco...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\mobile_application\MobileApplicationPermissionsRepository.java
1
请完成以下Java代码
private Optional<HUAttributeQueryFilterVO> getOrCreateAttributeFilterVO(@NonNull final I_M_Attribute attribute, @Nullable final String attributeValueType) { if (!huRelevantAttributeIds.contains(AttributeId.ofRepoId(attribute.getM_Attribute_ID()))) { return Optional.empty(); } return Optional.ofNullable(get...
final HashMap<AttributeId, HUAttributeQueryFilterVO> filterVOs = new HashMap<>(); for (final I_M_Attribute attribute : getBarcodeAttributes()) { final HUAttributeQueryFilterVO barcodeAttributeFilterVO = getOrCreateAttributeFilterVO( filterVOs, attribute, HUAttributeQueryFilterVO.ATTRIBUTEVALUETYPE...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUQueryBuilder_Attributes.java
1
请完成以下Java代码
public static GS1HUQRCode fromStringOrNullIfNotHandled(@NonNull final String string) { return fromScannedCodeOrNullIfNotHandled(ScannedCode.ofString(string)); } public static GS1HUQRCode fromScannedCodeOrNullIfNotHandled(@NonNull final ScannedCode scannedCode) { final GS1Elements elements = GS1Parser.parseElem...
@Override @Deprecated public String toString() {return getAsString();} @Override public String getAsString() {return code.getAsString();} public Optional<GTIN> getGTIN() {return elements.getGTIN();} @Override public Optional<BigDecimal> getWeightInKg() {return elements.getWeightInKg();} @Override public Op...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\gs1\GS1HUQRCode.java
1
请完成以下Java代码
public abstract class C_Invoice_Candidate_ProcessHelper extends ViewBasedProcessTemplate implements IProcessPrecondition { private int countUpdated = 0; private final C_Invoice_Candidate_ProcessCaptionMapperHelper processCaptionMapperHelper = SpringContextHolder.instance.getBean(C_Invoice_Candidate_ProcessCaptionMap...
}); return MSG_OK; } protected IQueryFilter<I_C_Invoice_Candidate> getSelectionFilter() { final SqlViewRowsWhereClause viewSqlWhereClause = getViewSqlWhereClause(getSelectedRowIds()); return viewSqlWhereClause.toQueryFilter(); } private SqlViewRowsWhereClause getViewSqlWhereClause(@NonNull final Document...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoicecandidate\process\C_Invoice_Candidate_ProcessHelper.java
1
请在Spring Boot框架中完成以下Java代码
public class DescriptionType { @XmlValue protected String content; @XmlAttribute(name = "Language", namespace = "http://erpel.at/schemas/1p0/documents") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String language; /** * Gets the value of the content property. * ...
* * @return * possible object is * {@link String } * */ public String getLanguage() { return language; } /** * Sets the value of the language property. * * @param value * allowed object is * {@link String } * */...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DescriptionType.java
2
请在Spring Boot框架中完成以下Java代码
public Saml2MetadataResponse resolve(HttpServletRequest request) { RequestMatcher.MatchResult matcher = this.requestMatcher.matcher(request); if (!matcher.isMatch()) { return null; } String registrationId = matcher.getVariables().get("registrationId"); RelyingPartyRegistration relyingPartyRegistratio...
void setRequestMatcher(RequestMatcher requestMatcher) { Assert.notNull(requestMatcher, "requestMatcher cannot be null"); this.requestMatcher = requestMatcher; } void setMetadataFilename(String metadataFilename) { Assert.hasText(metadataFilename, "metadataFilename cannot be empty"); Assert.isTrue(metada...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\web\Saml2MetadataFilter.java
2
请完成以下Java代码
protected ServletContext getServletContext() { return this.pageContext.getServletContext(); } private final class PageContextVariableLookupEvaluationContext implements EvaluationContext { private EvaluationContext delegate; private PageContextVariableLookupEvaluationContext(EvaluationContext delegate) { t...
} @Override public TypeComparator getTypeComparator() { return this.delegate.getTypeComparator(); } @Override public OperatorOverloader getOperatorOverloader() { return this.delegate.getOperatorOverloader(); } @Override public @Nullable BeanResolver getBeanResolver() { return this.delegate.g...
repos\spring-security-main\taglibs\src\main\java\org\springframework\security\taglibs\authz\JspAuthorizeTag.java
1
请完成以下Java代码
private String getManagementScheme(ServiceInstance instance) { String managementServerScheme = getMetadataValue(instance, KEYS_MANAGEMENT_SCHEME); if (hasText(managementServerScheme)) { return managementServerScheme; } return getServiceUrl(instance).getScheme(); } protected String getManagementHost(Servic...
protected Map<String, String> getMetadata(ServiceInstance instance) { return (instance.getMetadata() != null) ? instance.getMetadata() .entrySet() .stream() .filter((e) -> e.getKey() != null && e.getValue() != null) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)) : emptyMap(); } publ...
repos\spring-boot-admin-master\spring-boot-admin-server-cloud\src\main\java\de\codecentric\boot\admin\server\cloud\discovery\DefaultServiceInstanceConverter.java
1
请在Spring Boot框架中完成以下Java代码
public Queue directQueue() { return QueueBuilder.durable("DIRECT_QUEUE").build(); } /** * 通过绑定键 将指定队列绑定到一个指定的交换机 . * * @param queue the queue * @param exchange the exchange * @return the binding */ @Bean public Binding directBinding(@Qualifier("directQueue") Que...
return QueueBuilder.durable("FANOUT_QUEUE_B").build(); } /** * 绑定队列A 到Fanout 交换机. * * @param queue the queue * @param fanoutExchange the fanout exchange * @return the binding */ @Bean public Binding bindingA(@Qualifier("fanoutQueueA") Queue queue, ...
repos\SpringBootBucket-master\springboot-rabbitmq\src\main\java\com\xncoding\pos\config\RabbitConfig.java
2
请在Spring Boot框架中完成以下Java代码
public @Nullable String getName() { return name; } public void setName(String name) { this.name = name; } public Map<String, String> getArgs() { return args; } public void setArgs(Map<String, String> args) { this.args = args; } public void addArg(String key, String value) { this.args.put(key, valu...
PredicateProperties that = (PredicateProperties) o; return Objects.equals(name, that.name) && Objects.equals(args, that.args); } @Override public int hashCode() { return Objects.hash(name, args); } @Override public String toString() { final StringBuilder sb = new StringBuilder("PredicateDefinition{"); s...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\config\PredicateProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class ShippingService { private SessionFactory sessionFactory; private ShippingDao shippingDao; public ShippingService(SessionFactory sessionFactory, ShippingDao shippingDao) { this.sessionFactory = sessionFactory; this.shippingDao = shippingDao; } public String createConsig...
public void checkIn(String consignmentId, Checkin checkin) { try (Session session = sessionFactory.openSession()) { shippingDao.find(session, consignmentId) .ifPresent(consignment -> checkIn(session, consignment, checkin)); } } private void checkIn(Session session, Con...
repos\tutorials-master\aws-modules\aws-lambda-modules\shipping-tracker-lambda\ShippingFunction\src\main\java\com\baeldung\lambda\shipping\ShippingService.java
2
请完成以下Java代码
private ICompositeQueryFilter<I_S_ExternalReference> createFilterFor(@NonNull final ExternalReferenceQuery query) { final ICompositeQueryFilter<I_S_ExternalReference> queryFilter = queryBL.createCompositeQueryFilter(I_S_ExternalReference.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_S_ExternalRefer...
{ final IExternalReferenceType type = extractType(record); final ExternalSystem externalSystem = extractSystem(record); return ExternalReference.builder() .externalReferenceId(ExternalReferenceId.ofRepoId(record.getS_ExternalReference_ID())) .orgId(OrgId.ofRepoId(record.getAD_Org_ID())) .externalRefe...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalreference\src\main\java\de\metas\externalreference\ExternalReferenceRepository.java
1
请完成以下Java代码
public static WebuiViewToOpen modalOverlay(@NonNull final String viewId) { return builder().viewId(viewId).target(ViewOpenTarget.ModalOverlay).build(); } } @JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility....
{ /** * If this string is used as field value * then the frontend will try to open the new record modal window to populate that field. * <p> * Used mainly to trigger new BPartner. */ public static final String FIELD_VALUE_NEW = "NEW"; @NonNull String windowId; /** * Field values to be set by...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessExecutionResult.java
1
请完成以下Java代码
public class Person { @Override public String toString() { return "Person [name=" + name + ", nickname=" + nickname + ", age=" + age + "]"; } private String name; private String nickname; private int age; public Person() { } public Person(String name, String nickname, int age) { this.name = name; ...
public void setName(String name) { this.name = name; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
repos\tutorials-master\orika\src\main\java\com\baeldung\orika\Person.java
1
请在Spring Boot框架中完成以下Java代码
public void setAD_User_Performing_ID (final int AD_User_Performing_ID) { if (AD_User_Performing_ID < 1) set_Value (COLUMNNAME_AD_User_Performing_ID, null); else set_Value (COLUMNNAME_AD_User_Performing_ID, AD_User_Performing_ID); } @Override public int getAD_User_Performing_ID() { return get_ValueA...
} @Override public void setS_Issue(final de.metas.serviceprovider.model.I_S_Issue S_Issue) { set_ValueFromPO(COLUMNNAME_S_Issue_ID, de.metas.serviceprovider.model.I_S_Issue.class, S_Issue); } @Override public void setS_Issue_ID (final int S_Issue_ID) { if (S_Issue_ID < 1) set_Value (COLUMNNAME_S_Issue_...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_TimeBooking.java
2
请完成以下Java代码
public class ProcessDefinitionInfoEntityImpl extends AbstractEntity implements ProcessDefinitionInfoEntity, Serializable { private static final long serialVersionUID = 1L; protected String processDefinitionId; protected String infoJsonId; public ProcessDefinitionInfoEntityImpl() {} publi...
public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } public String getInfoJsonId() { return infoJsonId; } public void setInfoJsonId(Stri...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionInfoEntityImpl.java
1
请完成以下Java代码
private JSONProcessBasicInfo buildJSONProcessBasicInfo(@NonNull final ProcessBasicInfo processBasicInfo) { final String language = Env.getAD_Language(); final JSONProcessBasicInfo.JSONProcessBasicInfoBuilder jsonProcessInfoBuilder = JSONProcessBasicInfo.builder() .processId(String.valueOf(processBasicInfo.get...
.map(paramInfo -> JSONProcessParamBasicInfo .builder() .columnName(paramInfo.getColumnName()) .type(paramInfo.getType()) .name(paramInfo.getName().translate(language)) .description(paramInfo.getTranslatedDescriptionOrNull(language)) .build()) .collect(Collectors.toList());...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\process\impl\ProcessRestController.java
1
请完成以下Java代码
public void setAD_Rule_ID (int AD_Rule_ID) { if (AD_Rule_ID < 1) set_Value (COLUMNNAME_AD_Rule_ID, null); else set_Value (COLUMNNAME_AD_Rule_ID, Integer.valueOf(AD_Rule_ID)); } /** Get Rule. @return Rule */ @Override public int getAD_Rule_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_R...
@param Type Type of Validation (SQL, Java Script, Java Language) */ @Override public void setType (java.lang.String Type) { set_Value (COLUMNNAME_Type, Type); } /** Get Type. @return Type of Validation (SQL, Java Script, Java Language) */ @Override public java.lang.String getType () { return (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\letters\model\X_AD_BoilerPlate_Var.java
1
请完成以下Java代码
public String getSourceProcessDefinitionId() { return sourceProcessDefinitionId; } public void setSourceProcessDefinitionId(String sourceProcessDefinitionId) { this.sourceProcessDefinitionId = sourceProcessDefinitionId; } public String getTargetProcessDefinitionId() { return ta...
if (succesfulMigrationParts == null) { succesfulMigrationParts = new ArrayList<>(); } succesfulMigrationParts.add(migrationPart); } else { if (failedMigrationParts == null) { failedMigrationParts = new Array...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\migration\ProcessInstanceBatchMigrationResult.java
1
请完成以下Java代码
public TypeLocator getTypeLocator() { return this.delegate.getTypeLocator(); } @Override public TypeConverter getTypeConverter() { return this.delegate.getTypeConverter(); } @Override public TypeComparator getTypeComparator() { return this.delegate.getTypeComparator(); } @Override public O...
public @Nullable BeanResolver getBeanResolver() { return this.delegate.getBeanResolver(); } @Override public void setVariable(String name, @Nullable Object value) { this.delegate.setVariable(name, value); } @Override public Object lookupVariable(String name) { Object result = this.delegate.lookup...
repos\spring-security-main\taglibs\src\main\java\org\springframework\security\taglibs\authz\JspAuthorizeTag.java
1
请完成以下Java代码
public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public String getGroupNameAttribute() { return groupNameAttribute; } public void setGroupNameAttribute(String groupNameAttribute) { this.groupNameAttribut...
this.groupNameDelimiter = groupNameDelimiter; } } public OAuth2SSOLogoutProperties getSsoLogout() { return ssoLogout; } public void setSsoLogout(OAuth2SSOLogoutProperties ssoLogout) { this.ssoLogout = ssoLogout; } public OAuth2IdentityProviderProperties getIdentityProvider() { return iden...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-security\src\main\java\org\camunda\bpm\spring\boot\starter\security\oauth2\OAuth2Properties.java
1
请在Spring Boot框架中完成以下Java代码
public class LicenseFeeSettingsRepository { private final IQueryBL queryBL = Services.get(IQueryBL.class); @NonNull public LicenseFeeSettings getById(@NonNull final LicenseFeeSettingsId licenseFeeSettingsId) { final I_C_LicenseFeeSettings licenseFeeSettings = InterfaceWrapperHelper.load(licenseFeeSettingsId, I_C...
.pointsPrecision(record.getPointsPrecision()) .lines(licenseFeeSettingsLines) .build(); } @NonNull private LicenseFeeSettingsLine toLicenseFeeSettingsLine(@NonNull final I_C_LicenseFeeSettingsLine record) { final LicenseFeeSettingsId licenseFeeSettingsId = LicenseFeeSettingsId.ofRepoId(record.getC_Licens...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\licensefee\repository\LicenseFeeSettingsRepository.java
2
请完成以下Java代码
public JsonGetStatsResponse getStats(@RequestBody @NonNull final JsonCacheStatsQuery jsonQuery) { assertAuth(); final CCacheStatsPredicate filter = jsonQuery.toCCacheStatsPredicate(); final CCacheStatsOrderBy orderBy = jsonQuery.toCCacheStatsOrderBy().orElse(DEFAULT_ORDER_BY); return cacheMgt.streamStats(fil...
} } @GetMapping("/byId/{cacheId}/reset") public void resetCacheById(@PathVariable("cacheId") final String cacheIdStr) { assertAuth(); final long cacheId = Long.parseLong(cacheIdStr); final CacheInterface cacheInterface = cacheMgt.getById(cacheId) .orElseThrow(() -> new AdempiereException("No cache found...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\rest\CacheRestControllerTemplate.java
1
请完成以下Java代码
public TbQueueProducer<TbProtoQueueMsg<ToCoreNotificationMsg>> getTbCoreNotificationsMsgProducer() { return toTbCoreNotifications; } @Override public TbQueueProducer<TbProtoQueueMsg<ToUsageStatsServiceMsg>> getTbUsageStatsMsgProducer() { return toUsageStats; } @Override public ...
} @Override public TbQueueProducer<TbProtoQueueMsg<ToEdgeNotificationMsg>> getTbEdgeNotificationsMsgProducer() { return toEdgeNotifications; } @Override public TbQueueProducer<TbProtoQueueMsg<ToEdgeEventNotificationMsg>> getTbEdgeEventsMsgProducer() { return toEdgeEvents; } ...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\provider\TbCoreQueueProducerProvider.java
1
请完成以下Java代码
public class FlowableMyBatisRuntimeHints implements RuntimeHintsRegistrar { @Override public void registerHints(RuntimeHints hints, ClassLoader classLoader) { // These hints are coming from https://github.com/mybatis/spring-boot-starter/wiki/MyBatisNativeConfiguration.java MemberCategory[] memb...
reflectionHints.registerType(Jdk14LoggingImpl.class, memberCategories); reflectionHints.registerType(StdOutImpl.class, memberCategories); reflectionHints.registerType(NoLoggingImpl.class, memberCategories); reflectionHints.registerType(SqlSessionFactory.class, memberCategories); reflecti...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\aot\FlowableMyBatisRuntimeHints.java
1
请在Spring Boot框架中完成以下Java代码
public PutProductsRequest getSyncProductsRequest() { if (_syncProductsRequest == null) { _syncProductsRequest = createSyncProductsRequest(); } return _syncProductsRequest; } private PutProductsRequest createSyncProductsRequest() { final PutProductsRequestBuilder request = PutProductsRequest.builder();...
@Transactional void createDummyProductSupplies() { for (final BPartner bpartner : bpartnersRepo.findAll()) { for (final Contract contract : contractsRepo.findByBpartnerAndDeletedFalse(bpartner)) { final List<ContractLine> contractLines = contract.getContractLines(); if (contractLines.isEmpty()) ...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\util\DummyDataProducer.java
2
请完成以下Java代码
public int hashCode() { if (_hashcode == null) { _hashcode = Objects.hash(documentType, documentTypeId, documentId); } return _hashcode; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanceof DocumentKey)) { return f...
public WindowId getWindowId() { Check.assume(documentType == DocumentType.Window, "documentType shall be {} but it was {}", DocumentType.Window, documentType); return WindowId.of(documentTypeId); } public DocumentId getDocumentId() { return documentId; } public DocumentPath getDocumentPath() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentCollection.java
1
请完成以下Java代码
private List<I_AD_MigrationData> getKeyData() { if (m_migrationDataKeys != null) { return m_migrationDataKeys; } final List<I_AD_MigrationData> dataKeys = new ArrayList<I_AD_MigrationData>(); final List<I_AD_MigrationData> dataParents = new ArrayList<I_AD_MigrationData>(); for (final I_AD_MigrationData...
} else if (!dataParents.isEmpty()) { m_migrationDataKeys = dataParents; } else { throw new AdempiereException("Invalid key/parent constraints. Keys: " + dataKeys + ", Parents: " + dataParents); } return m_migrationDataKeys; } private void syncDBColumn(final I_AD_Column column, final boolean drop...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\POMigrationStepExecutor.java
1
请完成以下Java代码
public void createCollection() { // 定义集合和字段 FieldType idField = FieldType.newBuilder() .withName("id") .withDataType(DataType.Int64) .withPrimaryKey(true) .build(); FieldType vectorField = FieldType.newBuilder() .wi...
.build(); milvusClient.insert(insertParam); } public void flush() { milvusClient.flush(FlushParam.newBuilder() .withCollectionNames(Collections.singletonList("image_collection")) .withSyncFlush(true) .withSyncFlushWaitingInterval(50L) .withSyncFlushWaitingTimeout(30L) .build()); } ...
repos\springboot-demo-master\Milvus\src\main\java\com\et\imagesearch\MilvusManager.java
1
请在Spring Boot框架中完成以下Java代码
KotlinJpaMavenBuildCustomizer kotlinJpaMavenBuildCustomizer(InitializrMetadata metadata, ProjectDescription projectDescription) { return new KotlinJpaMavenBuildCustomizer(metadata, projectDescription); } @Bean @ConditionalOnBuildSystem(id = GradleBuildSystem.ID, dialect = GradleBuildSystem.DIALECT_KOTLIN) Kot...
/** * Kotlin source code contributions for projects using war packaging. */ @Configuration @ConditionalOnPackaging(WarPackaging.ID) static class WarPackagingConfiguration { @Bean ServletInitializerCustomizer<KotlinTypeDeclaration> javaServletInitializerCustomizer( ProjectDescription description) { re...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\code\kotlin\KotlinProjectGenerationDefaultContributorsConfiguration.java
2
请完成以下Java代码
private <ET> QueryResultPage<ET> loadPage( @NonNull final Class<ET> clazz, @NonNull final PageDescriptor currentPageDescriptor) { final TypedSqlQuery<ET> query = QuerySelectionHelper.createUUIDSelectionQuery( PlainContextAware.newWithThreadInheritedTrx(), clazz, currentPageDescriptor.getPageIdentif...
final PageDescriptor nextPageDescriptor; if (pageFullyLoaded) { nextPageDescriptor = currentPageDescriptor.createNext(); pageDescriptorRepository.save(nextPageDescriptor); } else { nextPageDescriptor = null; } return new QueryResultPage<ET>( currentPageDescriptor, nextPageDescriptor, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\selection\pagination\PaginationService.java
1
请完成以下Java代码
public static boolean isEnabledForTableName(final String tableName) { if (!isEnabled()) { return false; } final POInfo poInfo = POInfo.getPOInfo(tableName); if (poInfo == null) { return false; } final TableCloningEnabled cloningEnabled = poInfo.getCloningEnabled(); switch (cloningEnabled) {...
logger.info("Enabled for table: {}", tableName); } /** * Allows other modules to install customer code to be executed each time a record was copied. * Add a listener here, and it will automatically be added to each {@link CopyRecordSupport} instance that is returned by {@link #getCopyRecordSupport(String)}. */...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\copy_with_details\CopyRecordFactory.java
1
请完成以下Java代码
protected ExecutionEntity getExecution(CommandContext commandContext) { if (taskId != null) { TaskEntity task = getTask(commandContext); if (task != null) { return task.getExecution(); } else { return null; } } else { return getProcessInstance(commandContext); ...
protected boolean isHistoryRemovalTimeStrategyStart() { return HISTORY_REMOVAL_TIME_STRATEGY_START.equals(getHistoryRemovalTimeStrategy()); } protected String getHistoryRemovalTimeStrategy() { return Context.getProcessEngineConfiguration() .getHistoryRemovalTimeStrategy(); } protected HistoricPr...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\AddCommentCmd.java
1
请完成以下Java代码
private DocTypeId getDocTypeIdByType( @NonNull final String type, @NonNull final ClientId clientId, @NonNull final OrgId orgId) { final DocTypeQuery docTypeQuery = DocTypeQuery.builder() .docBaseType(type) .adClientId(clientId.getRepoId()) .adOrgId(orgId.getRepoId()) .build(); return docTy...
.bpartnerValue(bpartnerIdentifier.asValue()) .build(); break; default: throw new AdempiereException("Invalid bpartnerIdentifier: " + bpartnerIdentifier); } return query; } @VisibleForTesting public String buildDocumentNo(@NonNull final DocTypeId docTypeId) { final IDocumentNoBuilderFactory d...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\remittanceadvice\impl\CreateRemittanceAdviceService.java
1
请完成以下Java代码
private MDunningRun getParent() { if (m_parent == null) m_parent = new MDunningRun(getCtx(), getC_DunningRun_ID(), get_TrxName()); return m_parent; } // getParent @Override protected boolean beforeSave(boolean newRecord) { final IBPartnerStatsDAO bpartnerStatsDAO = Services.get(IBPartnerStatsDAO.class); ...
{ // set this particular credit status in the bp stats bpartnerStatsDAO.setSOCreditStatus(stats, X_C_BPartner_Stats.SOCREDITSTATUS_CreditStop); } if (level.isSetPaymentTerm()) { thisBPartner.setC_PaymentTerm_ID(level.getC_PaymentTerm_ID()); } bpartnersRepo.save(thisBPartner); } }...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MDunningRunEntry.java
1
请完成以下Java代码
protected String doIt() throws Exception { StringBuffer sql = new StringBuffer(""); int cnt = 0; log.info("Set Print Format"); try { sql.append("UPDATE AD_PrintFormat pf " + "SET AD_PrintPaper_ID = " + p_Record_ID + " " + "WHERE EXISTS (SELECT * FROM AD_PrintPaper pp " ...
} cnt = DB.executeUpdateAndSaveErrorOnFail(sql.toString(), get_TrxName()); log.info("Updated " + cnt + " columns"); log.debug("Committing ..."); DB.commit(true, null); } catch (Exception e) { log.error("set print format", e); } return "@Copied@=" + cnt; } // doIt } // AD_PrintPaper_Defaul...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\AD_PrintPaper_Default.java
1
请完成以下Java代码
public void execute(PvmExecutionImpl execution) { execution.activityInstanceDone(); ActivityBehavior activityBehavior = getActivityBehavior(execution); if (activityBehavior instanceof FlowNodeActivityBehavior) { FlowNodeActivityBehavior behavior = (FlowNodeActivityBehavior) activityBehavior; ...
throw e; } catch (Exception e) { throw new PvmException("couldn't leave activity <"+activity.getProperty("type")+" id=\""+activity.getId()+"\" ...>: "+e.getMessage(), e); } } else { throw new PvmException("Behavior of current activity is not an instance of " + FlowNodeActivityBehavior.clas...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationActivityLeave.java
1
请完成以下Java代码
public class IndexController { private final HttpSession httpSession; /** * 登录页面 * @return */ @ResponseBody @RequestMapping("/login") public String login() { return "login page."; } /** * 登录请求 * @param username * @return */ @RequestMapping("/...
return "/login"; } /** * 首页 * @return */ @ResponseBody @RequestMapping("/index") public String index() { log.info("session id: {}", httpSession.getId()); return "index page."; } /** * 退出登录 * @return */ @RequestMapping("/logout") public ...
repos\spring-boot-best-practice-master\spring-boot-session\src\main\java\cn\javastack\springboot\session\IndexController.java
1
请完成以下Java代码
public void setM_PackagingContainer_ID(final int M_PackagingContainer_ID) { if (M_PackagingContainer_ID < 1) set_ValueNoCheck(COLUMNNAME_M_PackagingContainer_ID, null); else set_ValueNoCheck(COLUMNNAME_M_PackagingContainer_ID, M_PackagingContainer_ID); } @Override public int getM_PackagingContainer_ID() ...
public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setValue(final @Nullable java.lang.String Value) { set_Value(COLUMNNAME_Value, Value); } @Override public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PackagingContainer.java
1
请在Spring Boot框架中完成以下Java代码
public String getName() { return this.name; } public void setName(String name) { this.name = name; } public OffHeapProperties getOffHeap() { return this.offHeap; } public PeerCacheProperties getPeer() { return this.peer; } public CacheServerProperties getServer() { return this.server; } public ...
private String memorySize; private String[] regionNames = {}; public String getMemorySize() { return this.memorySize; } public void setMemorySize(String memorySize) { this.memorySize = memorySize; } public String[] getRegionNames() { return this.regionNames; } public void setRegionNames(St...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\CacheProperties.java
2
请完成以下Java代码
public IPair<String, String> splitIntoStreet1AndStreet2(@NonNull final String streets1And2) { final List<String> list = Splitter.on(STREET_DELIMITER) .limit(2) .splitToList(streets1And2); return ImmutablePair.of( list.size() > 0 ? list.get(0) : null, list.size() > 1 ? list.get(1) : null); } pri...
if (bigDecimal == null) { return ""; } return bigDecimal.toString(); } private static String stringToString(@NonNull final Optional<String> string) { if (string.isPresent()) { return string.get(); } return ""; } private String truncateCheckDigitFromParcelNo(@NonNull final String parcelNumber)...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java\de\metas\shipper\gateway\derkurier\misc\Converters.java
1
请完成以下Java代码
public class SysTenant implements Serializable { private static final long serialVersionUID = 1L; /** * 编码 */ private Integer id; /** * 名称 */ private String name; /** * 创建人 */ @Dict(dictTable ="sys_user",dicText = "realname",dicCode = "username") ...
/** * 门牌号 */ private String houseNumber; /** * 工作地点 */ private String workPlace; /** * 二级域名(暂时无用,预留字段) */ private String secondaryDomain; /** * 登录背景图片(暂时无用,预留字段) */ private String loginBkgdImg; /** * 职级 */ @Dict(dicCode = "company...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysTenant.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isAutoStartup() { return this.autoStartup; } public void setAutoStartup(boolean autoStartup) { this.autoStartup = autoStartup; } public Duration getStartupDelay() { return this.startupDelay; } public void setStartupDelay(Duration startupDelay) { this.startupDelay = startupDelay; } pub...
} public void setWaitForJobsToCompleteOnShutdown(boolean waitForJobsToCompleteOnShutdown) { this.waitForJobsToCompleteOnShutdown = waitForJobsToCompleteOnShutdown; } public boolean isOverwriteExistingJobs() { return this.overwriteExistingJobs; } public void setOverwriteExistingJobs(boolean overwriteExisting...
repos\spring-boot-4.0.1\module\spring-boot-quartz\src\main\java\org\springframework\boot\quartz\autoconfigure\QuartzProperties.java
2