instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | class ServletOutputToInputConverter extends HttpServletResponseWrapper {
private StringBuilder builder = new StringBuilder();
ServletOutputToInputConverter(HttpServletResponse response) {
super(response);
}
@Override
public ServletOutputStream getOutputStream() throws IOException {
return new ServletOutputS... | public int read() throws IOException {
return body.read();
}
@Override
public void setReadListener(ReadListener listener) {
}
@Override
public boolean isReady() {
return true;
}
@Override
public boolean isFinished() {
return body.available() <= 0;
}
};
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\ProxyExchange.java | 1 |
请完成以下Java代码 | public void setContentHTML (String ContentHTML)
{
set_Value (COLUMNNAME_ContentHTML, ContentHTML);
}
/** Get Content HTML.
@return Contains the content itself
*/
public String getContentHTML ()
{
return (String)get_Value(COLUMNNAME_ContentHTML);
}
/** Set Description.
@param Description
Optional... | public void setIsValid (boolean IsValid)
{
set_Value (COLUMNNAME_IsValid, Boolean.valueOf(IsValid));
}
/** Get Valid.
@return Element is valid
*/
public boolean isValid ()
{
Object oo = get_Value(COLUMNNAME_IsValid);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).boolea... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Container_Element.java | 1 |
请完成以下Java代码 | public boolean isEngineTablePresent() {
return isTablePresent("ACT_RU_EXECUTION");
}
public boolean isHistoryTablePresent() {
return isTablePresent("ACT_HI_PROCINST");
}
protected String getCleanVersion(String versionString) {
Matcher matcher = CLEAN_VERSION_REGEX.matcher(versi... | protected ProcessEngineConfigurationImpl getProcessEngineConfiguration() {
return CommandContextUtil.getProcessEngineConfiguration();
}
@Override
protected String getResourcesRootDirectory() {
return "org/flowable/db/";
}
@Override
public String getContext() {
retur... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\db\ProcessDbSchemaManager.java | 1 |
请完成以下Java代码 | class ConnectionAcquireTimeThresholdExceededEventListener extends EventListener<ConnectionAcquireTimeThresholdExceededEvent> {
public static final Logger LOGGER = LoggerFactory.getLogger(ConnectionAcquireTimeThresholdExceededEventListener.class);
public ConnectionAcquireTimeThresholdExceededEventListener() {
... | }
}
class ConnectionAcquireTimeoutEventListener extends EventListener<ConnectionAcquireTimeoutEvent> {
public static final Logger LOGGER = LoggerFactory.getLogger(ConnectionAcquireTimeoutEventListener.class);
public ConnectionAcquireTimeoutEventListener() {
super(ConnectionAcquireTimeoutEvent.class);... | repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\flexypool\FlexypoolConfig.java | 1 |
请完成以下Java代码 | protected String getTargetTableName()
{
return I_C_Postal.Table_Name;
}
@Override
protected void updateAndValidateImportRecordsImpl()
{
}
@Override
protected String getImportOrderBySql()
{
return I_I_Postal.COLUMNNAME_Postal;
}
@Override
public I_I_Postal retrieveImportRecord(final Properties ctx, fi... | // the current handling for duplicates (postal code + country) is nonexistent.
// we blindly try to insert in db, and if there are unique constraints failing the records will automatically be marked as failed.
//noinspection UnusedAssignment
ImportRecordResult importResult = ImportRecordResult.Nothing;
final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impexp\PostalCodeImportProcess.java | 1 |
请完成以下Java代码 | public void setIsPublicWrite (boolean IsPublicWrite)
{
set_Value (COLUMNNAME_IsPublicWrite, Boolean.valueOf(IsPublicWrite));
}
/** Get Public Write.
@return Public can write entries
*/
public boolean isPublicWrite ()
{
Object oo = get_Value(COLUMNNAME_IsPublicWrite);
if (oo != null)
{
if (oo in... | else
set_ValueNoCheck (COLUMNNAME_K_Type_ID, Integer.valueOf(K_Type_ID));
}
/** Get Knowldge Type.
@return Knowledge Type
*/
public int getK_Type_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_K_Type_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Al... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_Topic.java | 1 |
请完成以下Java代码 | public IExporter createExporter(final String mimeType, final IExportDataSource dataSource, final Properties config)
{
Check.assumeNotNull(dataSource, "dataSource not null");
final Class<? extends IExporter> exporterClass = exporterClasses.get(mimeType);
if (exporterClass == null)
{
throw new AdempiereExcep... | return exporter;
}
@Override
public void registerExporter(String mimeType, Class<? extends IExporter> exporterClass)
{
Check.assume(!Check.isEmpty(mimeType, true), "mimeType not empty");
Check.assumeNotNull(exporterClass, "exporterClass not null");
exporterClasses.put(mimeType.trim(), exporterClass);
// T... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\ExporterFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class C_Order
{
private final IOrderDAO orderDAO = Services.get(IOrderDAO.class);
private final CallOrderService callOrderService;
private final DocumentChangeHandler_Order orderDocumentChangeHandler;
public C_Order(
@NonNull final CallOrderService callOrderService,
@NonNull final DocumentChangeHandl... | @DocValidate(timings = { ModelValidator.TIMING_AFTER_REACTIVATE })
public void handleReactivate(final I_C_Order order)
{
orderDocumentChangeHandler.onReactivate(order);
}
private void handleOrderComplete(@NonNull final I_C_Order order)
{
orderDAO.retrieveOrderLines(order, I_C_OrderLine.class)
.stream()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\callorder\interceptor\C_Order.java | 2 |
请完成以下Java代码 | public final class AuthorizationObservationConvention
implements ObservationConvention<AuthorizationObservationContext<?>> {
static final String OBSERVATION_NAME = "spring.security.authorizations";
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return OBSERVATION_NAME;
}
@Override
public S... | String className = context.getObject().getClass().getSimpleName();
if (className.contains("Method")) {
return "method";
}
if (className.contains("Request")) {
return "request";
}
if (className.contains("Message")) {
return "message";
}
if (className.contains("Exchange")) {
return "exchange";
... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\AuthorizationObservationConvention.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CourseRegistration {
@Id
@Column(name = "id")
private Long id;
@ManyToOne
@JoinColumn(name = "student_id")
private Student student;
@ManyToOne
@JoinColumn(name = "course_id")
private Course course;
@Column(name = "registered_at")
private LocalDateTime registe... | public void setGrade(int grade) {
this.grade = grade;
}
@Override
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) {
... | repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\manytomany\model\CourseRegistration.java | 2 |
请完成以下Java代码 | public class PosTable extends MiniTable {
/**
*
*/
private static final long serialVersionUID = 7884238751207398699L;
public PosTable() {
super();
setRowSelectionAllowed(true);
setColumnSelectionAllowed(false);
setMultiSelection(false);
setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
se... | }
public void growScrollbars() {
// fatter scroll bars
Container p = getParent();
if (p instanceof JViewport) {
Container gp = p.getParent();
if (gp instanceof JScrollPane) {
JScrollPane scrollPane = (JScrollPane) gp;
scrollPane.getVerticalScrollBar().setPreferredSize(new Dimension(3... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\pos\PosTable.java | 1 |
请完成以下Java代码 | public void resetRefundValue(@NonNull final I_C_Flatrate_RefundConfig configRecord)
{
final String refundBase = configRecord.getRefundBase();
if (X_C_Flatrate_RefundConfig.REFUNDBASE_Percentage.equals(refundBase))
{
configRecord.setRefundAmt(null);
}
else if (X_C_Flatrate_RefundConfig.REFUNDBASE_Amount.eq... | final RefundConfigQuery query = RefundConfigQuery
.builder()
.conditionsId(ConditionsId.ofRepoId(configRecord.getC_Flatrate_Conditions_ID()))
.build();
final List<RefundConfig> existingRefundConfigs = refundConfigRepository.getByQuery(query);
final RefundConfig newRefundConfig = refundConfigRepository.... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\interceptor\C_Flatrate_RefundConfig.java | 1 |
请完成以下Java代码 | public class RestrictedPersonIdentificationSEPA {
@XmlElement(name = "Id", required = true)
protected String id;
@XmlElement(name = "SchmeNm", required = true)
protected RestrictedPersonIdentificationSchemeNameSEPA schmeNm;
/**
* Gets the value of the id property.
*
* @return
... | this.id = value;
}
/**
* Gets the value of the schmeNm property.
*
* @return
* possible object is
* {@link RestrictedPersonIdentificationSchemeNameSEPA }
*
*/
public RestrictedPersonIdentificationSchemeNameSEPA getSchmeNm() {
return schmeNm;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\RestrictedPersonIdentificationSEPA.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPrefix() {
return this.prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getQualifierDelimiter() {
return this.qualifierDelimiter;
}
public void setQualifierDelimiter(String qualifierDelimiter) {
this.qualifierDelimiter = qualifierDelimite... | }
public void setSerializationMode(PageSerializationMode serializationMode) {
this.serializationMode = serializationMode;
}
}
/**
* Sort properties.
*/
public static class Sort {
/**
* Sort parameter name.
*/
private String sortParameter = "sort";
public String getSortParameter() {
ret... | repos\spring-boot-4.0.1\module\spring-boot-data-commons\src\main\java\org\springframework\boot\data\autoconfigure\web\DataWebProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public SecurityContextConfigurer<H> requireExplicitSave(boolean requireExplicitSave) {
this.requireExplicitSave = requireExplicitSave;
return this;
}
boolean isRequireExplicitSave() {
return this.requireExplicitSave;
}
SecurityContextRepository getSecurityContextRepository() {
SecurityContextRepository se... | SecurityContextHolderFilter securityContextHolderFilter = postProcess(
new SecurityContextHolderFilter(securityContextRepository));
securityContextHolderFilter.setSecurityContextHolderStrategy(getSecurityContextHolderStrategy());
http.addFilter(securityContextHolderFilter);
}
else {
SecurityContextPer... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\SecurityContextConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int getC_Project_Repair_Consumption_Summary_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Project_Repair_Consumption_Summary_ID);
}
@Override
public void setC_UOM_ID (final int C_UOM_ID)
{
if (C_UOM_ID < 1)
set_Value (COLUMNNAME_C_UOM_ID, null);
else
set_Value (COLUMNNAME_C_UOM_ID, C_UOM_ID);
}... | @Override
public void setQtyConsumed (final BigDecimal QtyConsumed)
{
set_Value (COLUMNNAME_QtyConsumed, QtyConsumed);
}
@Override
public BigDecimal getQtyConsumed()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyConsumed);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java-gen\de\metas\servicerepair\repository\model\X_C_Project_Repair_Consumption_Summary.java | 2 |
请完成以下Java代码 | public AuthenticationResult extractAuthenticatedUser(HttpServletRequest request,
ProcessEngine engine) {
String authorizationHeader = request.getHeader(HttpHeaders.AUTHORIZATION);
if (authorizationHeader != null && authorizationHeader.startsWith(BASIC_AUTH_HEADER_PREFIX)) {
String encodedCredential... | }
} else {
return AuthenticationResult.unsuccessful();
}
}
protected boolean isAuthenticated(ProcessEngine engine, String userName, String password) {
return engine.getIdentityService().checkPassword(userName, password);
}
@Override
public void augmentResponseByAuthenticationChallenge(
... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\security\auth\impl\HttpBasicAuthenticationProvider.java | 1 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | {
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void se... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_TopicCategory.java | 1 |
请完成以下Java代码 | public ActiveOrHistoricCurrencyAndAmount getAmt() {
return amt;
}
/**
* Sets the value of the amt property.
*
* @param value
* allowed object is
* {@link ActiveOrHistoricCurrencyAndAmount }
*
*/
public void setAmt(ActiveOrHistoricCurrencyAndAmount va... | }
/**
* Gets the value of the addtlInf property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddtlInf() {
return addtlInf;
}
/**
* Sets the value of the addtlInf property.
*
* @param value
* ... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\DocumentAdjustment1.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void setMimeMappings(WebServerFactory server) {
if (server instanceof ConfigurableServletWebServerFactory) {
MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
// IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
mappings.add("html", M... | source.registerCorsConfiguration("/api/**", config);
source.registerCorsConfiguration("/management/**", config);
source.registerCorsConfiguration("/v2/api-docs", config);
}
return new CorsFilter(source);
}
/**
* Initializes H2 console.
*/
private void initH... | repos\tutorials-master\jhipster-modules\jhipster-uaa\quotes\src\main\java\com\baeldung\jhipster\quotes\config\WebConfigurer.java | 2 |
请完成以下Java代码 | public String getFoosWithHeaders() {
return "Get some Foos with Header";
}
// @RequestMapping(value = "/foos", method = RequestMethod.GET, headers = "Accept=application/json")
// @ResponseBody
// public String getFoosAsJsonFromBrowser() {
// return "Get some Foos with Header Old";
// }
... | // --- Ambiguous Mapping
@GetMapping(value = "foos/duplicate" )
public ResponseEntity<String> duplicate() {
return new ResponseEntity<>("Duplicate", HttpStatus.OK);
}
// uncomment for exception of type java.lang.IllegalStateException: Ambiguous mapping
// @GetMapping(value = "foos/du... | repos\tutorials-master\spring-web-modules\spring-rest-http\src\main\java\com\baeldung\requestmapping\FooMappingExamplesController.java | 1 |
请完成以下Java代码 | public PersonIdentificationSchemeName1Choice getSchmeNm() {
return schmeNm;
}
/**
* Sets the value of the schmeNm property.
*
* @param value
* allowed object is
* {@link PersonIdentificationSchemeName1Choice }
*
*/
public void setSchmeNm(PersonIdenti... | *
*/
public String getIssr() {
return issr;
}
/**
* Sets the value of the issr property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIssr(String value) {
this.issr = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\GenericPersonIdentification1.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getRedisNamespace() {
return this.redisNamespace;
}
public SaveMode getSaveMode() {
return this.saveMode;
}
public SessionIdGenerator getSessionIdGenerator() {
return this.sessionIdGenerator;
}
public RedisSerializer<Object> getDefaultRedisSerializer() {
return this.defaultRedisSerializer... | @Autowired(required = false)
public void setSessionRepositoryCustomizer(
ObjectProvider<ReactiveSessionRepositoryCustomizer<T>> sessionRepositoryCustomizers) {
this.sessionRepositoryCustomizers = sessionRepositoryCustomizers.orderedStream().collect(Collectors.toList());
}
protected List<ReactiveSessionReposito... | repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\server\AbstractRedisWebSessionConfiguration.java | 2 |
请完成以下Java代码 | protected ProcessPreconditionsResolution checkPreconditionsApplicable()
{
final List<ProductsToPickRow> selectedRows = getSelectedRows();
if (selectedRows.isEmpty())
{
return ProcessPreconditionsResolution.rejectBecauseNoSelection().toInternal();
}
if (!selectedRows.stream().allMatch(ProductsToPickRow::i... | invalidateView();
return MSG_OK;
}
private void markAsWillNotPick(final ProductsToPickRow row)
{
final RejectPickingResult result = pickingCandidatesService.rejectPicking(RejectPickingRequest.builder()
.shipmentScheduleId(row.getShipmentScheduleId())
.qtyToReject(row.getQtyEffective())
.rejectPicki... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_MarkWillNotPickSelected.java | 1 |
请完成以下Java代码 | public java.lang.String getIsDirectPrint ()
{
return (java.lang.String)get_Value(COLUMNNAME_IsDirectPrint);
}
/** Set Letzte Seiten.
@param LastPages Letzte Seiten */
@Override
public void setLastPages (int LastPages)
{
set_Value (COLUMNNAME_LastPages, Integer.valueOf(LastPages));
}
/** Get Letzte Sei... | /** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
@Override
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Za... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\adempiere\model\X_AD_PrinterRouting.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<PlanningQuantityType> getPlanningQuantity() {
if (planningQuantity == null) {
planningQuantity = new ArrayList<PlanningQuantityType>();
}
return this.planningQuantity;
}
/**
* Gets the value of the forecastListLineItemExtension property.
*
* @retu... | return forecastListLineItemExtension;
}
/**
* Sets the value of the forecastListLineItemExtension property.
*
* @param value
* allowed object is
* {@link ForecastListLineItemExtensionType }
*
*/
public void setForecastListLineItemExtension(ForecastListLineIt... | 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 |
请在Spring Boot框架中完成以下Java代码 | public ReturnT<String> clearLog(int jobGroup, int jobId, int type){
Date clearBeforeTime = null;
int clearBeforeNum = 0;
if (type == 1) {
clearBeforeTime = DateUtil.addMonths(new Date(), -1); // 清理一个月之前日志数据
} else if (type == 2) {
clearBeforeTime = DateUtil.addMonths(new Date(), -3); // 清理三个月之前日志数据
} e... | } else if (type == 9) {
clearBeforeNum = 0; // 清理所有日志数据
} else {
return new ReturnT<String>(ReturnT.FAIL_CODE, I18nUtil.getString("joblog_clean_type_unvalid"));
}
List<Long> logIds = null;
do {
logIds = xxlJobLogDao.findClearLogIds(jobGroup, jobId, clearBeforeTime, clearBeforeNum, 1000);
if (logI... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\controller\JobLogController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class WebConfigurer implements WebMvcConfigurer {
@Autowired
private RequestMappingHandlerAdapter requestMappingHandlerAdapter;
@PostConstruct
public void init() {
// 获取当前 RequestMappingHandlerAdapter 所有的 ArgumentResolver对象
List<HandlerMethodArgumentResolver> argumentResolvers ... | // 获取当前 RequestMappingHandlerAdapter 所有的 returnValueHandlers对象
List<HandlerMethodReturnValueHandler> returnValueHandlers = requestMappingHandlerAdapter.getReturnValueHandlers();
List<HandlerMethodReturnValueHandler> newReturnValueHandlers = new ArrayList<>(returnValueHandlers.size() + 1);
// 添加 ... | repos\SpringAll-master\47.Spring-Boot-Content-Negotiation\src\main\java\com\example\demo\config\WebConfigurer.java | 2 |
请完成以下Java代码 | public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
public I_M_PriceList getM_PriceList() throws RuntimeException
{
return (I_M_PriceList)MTable.get(getCtx(), I_M_PriceList.Table_Name)
.getPO(getM_PriceList_ID(), get_TrxName()); }
/** Set Price List.
@param M_PriceList_ID
Uniq... | {
if (M_ProductMember_ID < 1)
set_Value (COLUMNNAME_M_ProductMember_ID, null);
else
set_Value (COLUMNNAME_M_ProductMember_ID, Integer.valueOf(M_ProductMember_ID));
}
/** Get Membership.
@return Product used to deternine the price of the membership for the topic type
*/
public int getM_ProductMember... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_TopicType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Iterable<MyUser> findAllByQuerydsl(@RequestParam(value = "search") String search) {
MyUserPredicatesBuilder builder = new MyUserPredicatesBuilder();
if (search != null) {
Pattern pattern = Pattern.compile("(\\w+?)(:|<|>)(\\w+?),");
Matcher matcher = pattern.matcher(search ... | @ResponseBody
public Iterable<MyUser> findAllByWebQuerydsl(@QuerydslPredicate(root = MyUser.class) Predicate predicate) {
return myUserRepository.findAll(predicate);
}
// API - WRITE
@RequestMapping(method = RequestMethod.POST, value = "/users")
@ResponseStatus(HttpStatus.CREATED)
publ... | repos\tutorials-master\spring-web-modules\spring-rest-query-language\src\main\java\com\baeldung\web\controller\UserController.java | 2 |
请完成以下Java代码 | public void setIsPublicWrite (boolean IsPublicWrite)
{
set_Value (COLUMNNAME_IsPublicWrite, Boolean.valueOf(IsPublicWrite));
}
/** Get Public Write.
@return Public can write entries
*/
public boolean isPublicWrite ()
{
Object oo = get_Value(COLUMNNAME_IsPublicWrite);
if (oo != null)
{
if (oo in... | public int getK_Type_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_K_Type_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 Name.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_Type.java | 1 |
请完成以下Java代码 | public void setPluFileDestination (final java.lang.String PluFileDestination)
{
set_Value (COLUMNNAME_PluFileDestination, PluFileDestination);
}
@Override
public java.lang.String getPluFileDestination()
{
return get_ValueAsString(COLUMNNAME_PluFileDestination);
}
@Override
public void setPluFileLocalFold... | set_Value (COLUMNNAME_TCP_Host, TCP_Host);
}
@Override
public String getTCP_Host()
{
return get_ValueAsString(COLUMNNAME_TCP_Host);
}
@Override
public void setTCP_PortNumber (final int TCP_PortNumber)
{
set_Value (COLUMNNAME_TCP_PortNumber, TCP_PortNumber);
}
@Override
public int getTCP_PortNumber() ... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_LeichMehl.java | 1 |
请完成以下Java代码 | public class X_InvoiceProcessingServiceCompany extends org.compiere.model.PO implements I_InvoiceProcessingServiceCompany, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = 394872485L;
/** Standard Constructor */
public X_InvoiceProcessingServiceCompany (Properties ctx, int Invo... | else
set_Value (COLUMNNAME_ServiceCompany_BPartner_ID, Integer.valueOf(ServiceCompany_BPartner_ID));
}
@Override
public int getServiceCompany_BPartner_ID()
{
return get_ValueAsInt(COLUMNNAME_ServiceCompany_BPartner_ID);
}
@Override
public void setServiceFee_Product_ID (int ServiceFee_Product_ID)
{
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_InvoiceProcessingServiceCompany.java | 1 |
请完成以下Java代码 | public class DeptVO extends Dept implements INode<DeptVO> {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 父节点ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long parentId;
/**
* 子孙节点
*... | @JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<DeptVO> children;
@Override
public List<DeptVO> getChildren() {
if (this.children == null) {
this.children = new ArrayList<>();
}
return this.children;
}
/**
* 上级部门
*/
private String parentName;
} | repos\SpringBlade-master\blade-service-api\blade-system-api\src\main\java\org\springblade\system\vo\DeptVO.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Point getLocation() {
return location;
}
public void setLocation(Point location) {
this.location = location;
}
@Override
public int hashCode() {
... | @SuppressWarnings("unused")
private Campus() {
}
public Campus(Builder b) {
this.id = b.id;
this.name = b.name;
this.location = b.location;
}
public static class Builder {
private String id;
private String name;
private Point location;
publi... | repos\tutorials-master\persistence-modules\spring-data-couchbase-2\src\main\java\com\baeldung\spring\data\couchbase\model\Campus.java | 1 |
请完成以下Java代码 | public PInstanceId getAD_PInstance_ID()
{
return AD_PInstance_ID;
}
public static final class Builder
{
private int AD_Session_ID;
private String trxName;
private int AD_Table_ID;
private int AD_Column_ID;
private int record_ID;
private int AD_Client_ID;
private int AD_Org_ID;
private Object oldV... | public Builder setAD_Org_ID(final int AD_Org_ID)
{
this.AD_Org_ID = AD_Org_ID;
return this;
}
public Builder setOldValue(final Object oldValue)
{
this.oldValue = oldValue;
return this;
}
public Builder setNewValue(final Object newValue)
{
this.newValue = newValue;
return this;
}
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\session\ChangeLogRecord.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
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,... | public void setLeichMehl_PluFile_ConfigGroup_ID (final int LeichMehl_PluFile_ConfigGroup_ID)
{
if (LeichMehl_PluFile_ConfigGroup_ID < 1)
set_Value (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, null);
else
set_Value (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, LeichMehl_PluFile_ConfigGroup_ID);
}
@Overr... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_LeichMehl_ProductMapping.java | 1 |
请完成以下Java代码 | public ProcessApplicationReference getReference() {
ensureInitialized();
return getEjbProcessApplicationReference();
}
@Override
protected String autodetectProcessApplicationName() {
return lookupEeApplicationName();
}
/** allows subclasses to provide a custom business interface */
protected C... | protected abstract ProcessApplicationReference getEjbProcessApplicationReference();
/**
* lookup a proxy object representing the invoked business view of this component.
*/
protected abstract ProcessApplicationInterface lookupSelfReference();
/**
* determine the ee application name based on information... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\application\impl\AbstractEjbProcessApplication.java | 1 |
请完成以下Java代码 | public void setRelatedProduct_ID (int RelatedProduct_ID)
{
if (RelatedProduct_ID < 1)
set_ValueNoCheck (COLUMNNAME_RelatedProduct_ID, null);
else
set_ValueNoCheck (COLUMNNAME_RelatedProduct_ID, Integer.valueOf(RelatedProduct_ID));
}
/** Get Related Product.
@return Related Product
*/
public int ge... | /** Supplemental = S */
public static final String RELATEDPRODUCTTYPE_Supplemental = "S";
/** Set Related Product Type.
@param RelatedProductType Related Product Type */
public void setRelatedProductType (String RelatedProductType)
{
set_ValueNoCheck (COLUMNNAME_RelatedProductType, RelatedProductType);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RelatedProduct.java | 1 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final PartitionConfig config = dlmService.loadPartitionConfig(configDB);
final List<TableRecordIdDescriptor> tableRecordReferences = Services.get(ITableRecordIdDAO.class).retrieveAllTableRecordIdReferences();
// get those descriptors whose referencedTableName is the t... | * From the given <code>descriptors</code> list, return those ones that reference of the lines of the given <code>config</code>.
*
* @param config
* @param tableRecordReferences
* @return
*/
@VisibleForTesting
/* package */ List<TableRecordIdDescriptor> retainRelevantDescriptors(final PartitionConfig config,... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\process\DLM_Partition_Config_Add_TableRecord_Lines.java | 1 |
请完成以下Java代码 | public java.math.BigDecimal getDivideRate ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DivideRate);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Ziel ist Catch-Maßeinheit.
@param IsCatchUOMForProduct
Legt fest ob die Ziel-Maßeinheit die Parallel-Maßeinheit des Produktes ist,... | @return Produkt, Leistung, Artikel
*/
@Override
public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Faktor.
@param MultiplyRate
Rate to multiple the source by to calculate the target.
*/
@Overrid... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_UOM_Conversion.java | 1 |
请完成以下Java代码 | public void validateInactivation(@NonNull final I_C_DocType_Invoicing_Pool docTypeInvoicingPoolRecord)
{
if (docTypeInvoicingPoolRecord.isActive())
{
return;
}
final ImmutableSet<DocTypeId> referencingDocTypeIds = docTypeBL
.getDocTypeIdsByInvoicingPoolId(DocTypeInvoicingPoolId.ofRepoId(docTypeInvoic... | private void validateNegativeAmountDocType(@NonNull final I_C_DocType_Invoicing_Pool docTypeInvoicingPoolRecord)
{
final DocTypeId negativeAmountDocTypeId = DocTypeId.ofRepoId(docTypeInvoicingPoolRecord.getNegative_Amt_C_DocType_ID());
validateDocType(negativeAmountDocTypeId, docTypeInvoicingPoolRecord);
}
pri... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\invoicingpool\C_DocType_Invoicing_Pool.java | 1 |
请完成以下Java代码 | public void setCdtDbtInd(CreditDebitCode value) {
this.cdtDbtInd = value;
}
/**
* Gets the value of the tp property.
*
* @return
* possible object is
* {@link InterestType1Choice }
*
*/
public InterestType1Choice getTp() {
return tp;
}
... | */
public DateTimePeriodDetails getFrToDt() {
return frToDt;
}
/**
* Sets the value of the frToDt property.
*
* @param value
* allowed object is
* {@link DateTimePeriodDetails }
*
*/
public void setFrToDt(DateTimePeriodDetails value) {
th... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TransactionInterest2.java | 1 |
请完成以下Java代码 | public static MEXPFormat getFormatByAD_Client_IDAD_Table_IDAndVersion(final Properties ctx, final int AD_Client_ID, final int AD_Table_ID, final String version, final String trxName)
{
final String key = Services.get(IADTableDAO.class).retrieveTableName(AD_Table_ID) + version;
MEXPFormat retValue=null;
if(trxNa... | }
return retValue;
}
@Override
public String toString() {
return "MEXPFormat[ID=" + get_ID() + "; Value = " + getValue() + "]";
}
/**
* Before Delete
* @return true of it can be deleted
*/
@Override
protected boolean beforeDelete ()
{
for (final I_EXP_FormatLine line : getFormatLinesOrderedBy(tr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MEXPFormat.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyTU()
{
return invoiceLine.getQtyEnteredTU();
}
@Override
public void setQtyTU(final BigDecimal qtyPacks)
{
invoiceLine.setQtyEnteredTU(qtyPacks);
}
@Override
public void setC_BPartner_ID(final int partnerId)
{
values.setC_BPartner_ID(partnerId);
} | @Override
public int getC_BPartner_ID()
{
return values.getC_BPartner_ID();
}
@Override
public boolean isInDispute()
{
return values.isInDispute();
}
@Override
public void setInDispute(final boolean inDispute)
{
values.setInDispute(inDispute);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\InvoiceLineHUPackingAware.java | 1 |
请完成以下Java代码 | public class User {
int id;
String name;
Role role = new Role();
public User() {
}
public User(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
} | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Role getRole() {
return role;
}
public void setRole(Role role) {
this.role = role;
}
} | repos\tutorials-master\libraries-stream\src\main\java\com\baeldung\streamex\User.java | 1 |
请完成以下Java代码 | public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Book other = (Book) obj;
if (author == null) {
if (other.author != null)
... | return false;
} else if (!isbn.equals(other.isbn))
return false;
if (publisher == null) {
if (other.publisher != null)
return false;
} else if (!publisher.equals(other.publisher))
return false;
if (title == null) {
if (other... | repos\tutorials-master\persistence-modules\java-mongodb\src\main\java\com\baeldung\bsontojson\Book.java | 1 |
请完成以下Java代码 | public boolean contains(PropertyListKey<?> property) {
return properties.containsKey(property.getName());
}
/**
* Returns <code>true</code> if this properties contains a mapping for the specified property key.
*
* @param property
* the property key whose presence is to be tested
* @re... | /**
* Returns a map view of this properties. Changes to the map are not reflected
* to the properties.
*
* @return a map view of this properties
*/
public Map<String, Object> toMap() {
return new HashMap<String, Object>(properties);
}
@Override
public String toString() {
return "Properti... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\Properties.java | 1 |
请完成以下Java代码 | public class DBRes_da extends ListResourceBundle
{
/** Data */
static final Object[][] contents = new String[][]
{
{ "CConnectionDialog", "Forbindelse" },
{ "Name", "Navn" },
{ "AppsHost", "Programvært" },
{ "AppsPort", "Programport" },
{ "TestApps", "Test pro... | { "ConnectionProfile", "Connection" },
{ "LAN", "LAN" },
{ "TerminalServer", "Terminal Server" },
{ "VPN", "VPN" },
{ "WAN", "WAN" },
{ "ConnectionError", "Fejl i forbindelse" },
{ "ServerNotActive", "Server er ikke aktiv" }
};
/**
* Get Contsnts
* @return contents
*/
public Object[][... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\connectiondialog\i18n\DBRes_da.java | 1 |
请完成以下Java代码 | public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Prefix.
@param Prefix
Prefix before the sequence number
*/
public void setPrefix (String Prefix)
{
set_Value (COLUMNNAME_Prefix, Prefix);
}
/** Get Prefix.
@return Prefix before the sequence ... | */
public void setRemote_Org_ID (int Remote_Org_ID)
{
if (Remote_Org_ID < 1)
set_ValueNoCheck (COLUMNNAME_Remote_Org_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Remote_Org_ID, Integer.valueOf(Remote_Org_ID));
}
/** Get Remote Organization.
@return Remote Organization to be used to replicate / synchr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Replication.java | 1 |
请完成以下Java代码 | public final class FallbackStubFactory implements StubFactory {
@Override
public boolean isApplicable(final Class<? extends AbstractStub<?>> stubType) {
return true;
}
@Override
public AbstractStub<?> createStub(final Class<? extends AbstractStub<?>> stubType, final Channel channel) {
... | && Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)
&& method.getReturnType().isAssignableFrom(stubType)
&& parameters.length == 1
&& Channel.class.equals(parameters[0].getType())) {
return AbstractSt... | repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\stubfactory\FallbackStubFactory.java | 1 |
请完成以下Java代码 | public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getShowStatus() {
return showStatus;
}
public void setShowStatus(Integer showStatus) {
this.showStatus = showStatus;
}
@Override
public String toString() {
StringBui... | sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", memberNickName=").append(memberNickName);
sb.append(", topicId=").append(topicId);
sb.append(", memberIcon=").append(memberIcon);
... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsTopicComment.java | 1 |
请完成以下Java代码 | public String toString() {
return filterToStringCreator(RequestHeaderSizeGatewayFilterFactory.this)
.append("maxSize", config.getMaxSize())
.toString();
}
};
}
private static String getErrorMessage(HashMap<String, Long> longHeaders, DataSize maxSize) {
StringBuilder msg = new StringBuilder(Strin... | public void setMaxSize(DataSize maxSize) {
this.maxSize = maxSize;
}
public @Nullable String getErrorHeaderName() {
return errorHeaderName;
}
public void setErrorHeaderName(String errorHeaderName) {
this.errorHeaderName = errorHeaderName;
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RequestHeaderSizeGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public void initialize() {
if (threadPoolTaskScheduler != null) {
threadPoolTaskScheduler.initialize();
}
Instant initialInstant = Instant.now().plus(initialDelay);
taskScheduler.scheduleWithFixedDelay(createChangeDetectionRunnable(), initialInstant, delay);
}
prot... | public void destroy() {
if (threadPoolTaskScheduler != null) {
threadPoolTaskScheduler.destroy();
}
}
public EventRegistryChangeDetectionManager getEventRegistryChangeDetectionManager() {
return eventRegistryChangeDetectionManager;
}
@Override
public void setEven... | repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\management\DefaultSpringEventRegistryChangeDetectionExecutor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public AnonymousConfigurer<H> authenticationFilter(AnonymousAuthenticationFilter authenticationFilter) {
this.authenticationFilter = authenticationFilter;
return this;
}
@Override
public void init(H http) {
if (this.authenticationProvider == null) {
this.authenticationProvider = new AnonymousAuthentication... | }
private String getKey() {
if (this.computedKey != null) {
return this.computedKey;
}
if (this.key == null) {
this.computedKey = UUID.randomUUID().toString();
}
else {
this.computedKey = this.key;
}
return this.computedKey;
}
} | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AnonymousConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public RegionShortcut getShortcut() {
return this.shortcut != null ? this.shortcut : DEFAULT_SERVER_REGION_SHORTCUT;
}
public void setShortcut(RegionShortcut shortcut) {
this.shortcut = shortcut;
}
}
public static class SessionProperties {
@NestedConfigurationProperty
private final SessionAttribute... | int maxInactiveIntervalInSeconds = duration != null
? Long.valueOf(duration.toSeconds()).intValue()
: GemFireHttpSessionConfiguration.DEFAULT_MAX_INACTIVE_INTERVAL_IN_SECONDS;
setMaxInactiveIntervalSeconds(maxInactiveIntervalInSeconds);
}
}
public static class SessionRegionProperties {
private Strin... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\SpringSessionProperties.java | 2 |
请完成以下Java代码 | public class AlarmInfo extends Alarm {
@Serial
private static final long serialVersionUID = 2807343093519543363L;
@Getter
@Setter
@Schema(description = "Alarm originator name", example = "Thermostat")
private String originatorName;
@Getter
@Setter
@Schema(description = "Alarm orig... | public String getOriginatorDisplayName() {
return originatorDisplayName != null ? originatorDisplayName : (originatorLabel != null ? originatorLabel : originatorName);
}
public AlarmInfo(AlarmInfo alarmInfo) {
super(alarmInfo);
this.originatorName = alarmInfo.getOriginatorName();
... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\alarm\AlarmInfo.java | 1 |
请完成以下Java代码 | public String getComponent() {
return component;
}
public void setComponent(String component) {
this.component = component;
}
public String getComponentName() {
return componentName;
}
public void setComponentName(String componentName) {
this.componentName = componentName;
}
public String getUrl() {... | this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getPerms() {
return perms;
}
pub... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\model\SysPermissionTree.java | 1 |
请完成以下Java代码 | public class TextManipulator {
private String text;
public TextManipulator(String text) {
this.text = text;
}
public String getText() {
return text;
}
public void appendText(String newText) {
text = text.concat(newText);
}
public String findWordAndReplace(Stri... | text = text.replace(word, replacementWord);
}
return text;
}
public String findWordAndDelete(String word) {
if (text.contains(word)) {
text = text.replace(word, "");
}
return text;
}
/*
* Bad practice when implementing SRP principle, not in the scope ... | repos\tutorials-master\patterns-modules\solid\src\main\java\com\baeldung\s\TextManipulator.java | 1 |
请完成以下Java代码 | public void setIsPrintFunctionSymbols (boolean IsPrintFunctionSymbols)
{
set_Value (COLUMNNAME_IsPrintFunctionSymbols, Boolean.valueOf(IsPrintFunctionSymbols));
}
/** Get Print Function Symbols.
@return Print Symbols for Functions (Sum, Average, Count)
*/
public boolean isPrintFunctionSymbols ()
{
Objec... | BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_LineStroke);
if (bd == null)
return Env.ZERO;
return bd;
}
/** LineStrokeType AD_Reference_ID=312 */
public static final int LINESTROKETYPE_AD_Reference_ID=312;
/** Solid Line = S */
public static final String LINESTROKETYPE_SolidLine = "S";
/** Dashed Lin... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintTableFormat.java | 1 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:postgresql://localhost:5432/postgres
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.jdbc.lo... | a.properties.hibernate.jdbc.batch_size = 30
spring.jpa.properties.hibernate.generate_statistics=true
logging.level.org.hibernate.type.descriptor.sql=TRACE | repos\Hibernate-SpringBoot-master\HibernateSpringBootHiLo\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ExecutorConfig {
/**
* Set the ThreadPoolExecutor's core pool size.
*/
private int corePoolSize = 10;
/**
* Set the ThreadPoolExecutor's maximum pool size.
*/
private int maxPoolSize = 200;
/**
* Set the capacity for the ThreadPoolExecutor's BlockingQueue.
... | @Bean
public Executor myAsync() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(corePoolSize);
executor.setMaxPoolSize(maxPoolSize);
executor.setQueueCapacity(queueCapacity);
executor.setThreadNamePrefix("MyExecutor-");
// r... | repos\SpringBootBucket-master\springboot-rabbitmq-rpc\springboot-rabbitmq-rpc-server\src\main\java\com\xncoding\pos\config\ExecutorConfig.java | 2 |
请完成以下Java代码 | public static Map<String, TimerDeclarationImpl> getDeclarationsForScope(PvmScope scope) {
if (scope == null) {
return Collections.emptyMap();
}
Map<String, TimerDeclarationImpl> result = scope.getProperties().get(BpmnProperties.TIMER_DECLARATIONS);
if (result != null) {
return result;
}... | public static Map<String, Map<String, TimerDeclarationImpl>> getTimeoutListenerDeclarationsForScope(PvmScope scope) {
if (scope == null) {
return Collections.emptyMap();
}
Map<String, Map<String, TimerDeclarationImpl>> result = scope.getProperties().get(BpmnProperties.TIMEOUT_LISTENER_DECLARATIONS);
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\TimerDeclarationImpl.java | 1 |
请完成以下Java代码 | private <T extends Serializable> Class<T> classIdTypeFrom(String className) {
if (className == null) {
return null;
}
try {
return (Class) Class.forName(className);
}
catch (ClassNotFoundException ex) {
log.debug("Unable to find class id type on classpath", ex);
return null;
}
}
private <T> b... | private static class StringToLongConverter implements Converter<String, Long> {
@Override
public Long convert(String identifierAsString) {
if (identifierAsString == null) {
throw new ConversionFailedException(TypeDescriptor.valueOf(String.class),
TypeDescriptor.valueOf(Long.class), null, null);
}
... | repos\spring-security-main\acl\src\main\java\org\springframework\security\acls\jdbc\AclClassIdUtils.java | 1 |
请完成以下Java代码 | private String getSQLDataType()
{
final String columnName = getColumnName();
final ReferenceId displayType = getReferenceId();
final int fieldLength = getFieldLength();
return DB.getSQLDataType(displayType.getRepoId(), columnName, fieldLength);
}
private String getSQLDefaultValue()
{
final int displayTyp... | {
return defaultValue;
}
}
else
{
return defaultValue;
}
}
else
{
return null;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\ddl\ColumnDDL.java | 1 |
请完成以下Java代码 | public static final BigDecimal calculatePercentage(final BigDecimal qty, final BigDecimal qtyReference)
{
if (qty == null || qty.signum() == 0)
{
return BigDecimal.ZERO;
}
if (qtyReference == null)
{
// shall not happen
return null;
}
if (qtyReference.signum() == 0)
{
return BigDecimal.ZER... | {
return BigDecimal.ZERO;
}
if (percentage == null || percentage.signum() == 0)
{
return BigDecimal.ZERO;
}
final int precision = uom.getStdPrecision();
final BigDecimal qty = qtyBase
.multiply(percentage)
.divide(Env.ONEHUNDRED, precision, RoundingMode.HALF_UP);
return qty;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\util\QualityBasedInspectionUtils.java | 1 |
请完成以下Java代码 | public VariableMapper getVariableMapper() {
return null;
}
@Override
public FunctionMapper getFunctionMapper() {
return null;
}
@Override
public jakarta.el.ELResolver getELResolver() {
return getWra... | try {
Object result = getWrappedResolver().getValue(this.context, base, property);
context.setPropertyResolved(result != null);
return result;
} catch (IllegalStateException e) {
// dependent scoped / EJBs
Object result = ProgrammaticBeanLookup.lookup(... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\el\CdiResolver.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BatchBuilderImpl implements BatchBuilder {
protected BatchServiceConfiguration batchServiceConfiguration;
protected CommandExecutor commandExecutor;
protected String batchType;
protected String searchKey;
protected String searchKey2;
protected String status;
protected ... | }
});
} else {
return ((BatchServiceImpl) batchServiceConfiguration.getBatchService()).createBatch(this);
}
}
@Override
public String getBatchType() {
return batchType;
}
@Override
public String getSearchKey() {
return search... | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\BatchBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | static BigDecimal extractBigDecimal(final Object value)
{
if (value == null)
{
return null;
}
if (value instanceof BigDecimal)
{
return (BigDecimal)value;
}
final String valueStr = value.toString().trim();
if (valueStr.isEmpty())
{
return null;
}
return extractBigDecimalFromStringWithU... | }
private static boolean isInteger(final BigDecimal numberCandidate)
{
return numberCandidate.stripTrailingZeros().scale() <= 0;
}
@Nullable
private Date extractDate(@NonNull final Map<String, Object> map, @NonNull final String key)
{
final Object value = getValue(map, key);
if (value == null)
{
retu... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\excelimport\Excel_OLCand_Row_Builder.java | 2 |
请完成以下Java代码 | public boolean isNull(final Object model, final String columnName)
{
return POWrapper.isNull(model, columnName);
}
@Nullable
@Override
public <T> T getDynAttribute(final @NonNull Object model, final String attributeName)
{
return POWrapper.getDynAttribute(model, attributeName);
}
@Override
public Object ... | return POWrapper.getStrictPO(model);
}
@Override
public Evaluatee getEvaluatee(final Object model)
{
return POWrapper.getStrictPO(model);
}
@Override
public boolean isCopy(final Object model) {return POWrapper.getStrictPO(model).isCopiedFromOtherRecord();}
@Override
public boolean isCopying(final Object m... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POInterfaceWrapperHelper.java | 1 |
请完成以下Java代码 | public String getExtraValue() {
return extraValue;
}
public String getInvolvedUser() {
return involvedUser;
}
public Collection<String> getInvolvedGroups() {
return involvedGroups;
}
public String getTenantId() {
return tenantId;
}
public boolean isWithout... | super.ensureVariablesInitialized();
for (PlanItemInstanceQueryImpl orQueryObject : orQueryObjects) {
orQueryObject.ensureVariablesInitialized();
}
}
public List<PlanItemInstanceQueryImpl> getOrQueryObjects() {
return orQueryObjects;
}
public List<List<String>> getSa... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\PlanItemInstanceQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void configureDecisionDefinitionQuery(DecisionDefinitionQueryImpl query) {
getAuthorizationManager().configureDecisionDefinitionQuery(query);
getTenantManager().configureQuery(query);
}
protected ListQueryParameterObject configureParameterizedQuery(Object parameter) {
return getTenantManager(... | @Override
public DecisionDefinitionEntity findLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId) {
return findLatestDecisionDefinitionByKeyAndTenantId(definitionKey, tenantId);
}
@Override
public DecisionDefinitionEntity findDefinitionByKeyVersionAndTenantId(String definitionKey, Integ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionDefinitionManager.java | 2 |
请完成以下Java代码 | public String getVariableScopeKey() {
return "connector";
}
protected VariableStore<CoreVariableInstance> getVariableStore() {
return (VariableStore) variableStore;
}
@Override
protected VariableInstanceFactory<CoreVariableInstance> getVariableInstanceFactory() {
return (VariableInstanceFactory)... | public AbstractVariableScope getParentVariableScope() {
return parent;
}
public void writeToRequest(ConnectorRequest<?> request) {
for (CoreVariableInstance variable : variableStore.getVariables()) {
request.setRequestParameter(variable.getName(), variable.getTypedValue(true).getValue());
}
}
... | repos\camunda-bpm-platform-master\engine-plugins\connect-plugin\src\main\java\org\camunda\connect\plugin\impl\ConnectorVariableScope.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public MSV3ClientConfig toMSV3ClientConfig(@NonNull final I_MSV3_Vendor_Config configDataRecord)
{
final URL baseUrl = toURL(configDataRecord);
return newMSV3ClientConfig()
.baseUrl(baseUrl)
.authUsername(configDataRecord.getUserID())
.authPassword(configDataRecord.getPassword())
.bpartnerId(de.me... | public MSV3ClientConfig save(@NonNull final MSV3ClientConfig config)
{
final I_MSV3_Vendor_Config configRecord = createOrUpdateRecord(config);
saveRecord(configRecord);
return config.toBuilder()
.configId(MSV3ClientConfigId.ofRepoId(configRecord.getMSV3_Vendor_Config_ID()))
.build();
}
private I_MSV3... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\config\MSV3ClientConfigRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void upload(MultipartFile[] files) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
for (MultipartFile file : files) {
String fileName = file.getOriginalFilename();
boolean match = FILE_STORAGE.stream().anyMatch(fileInfo -> fileInfo.getFil... | }
}
@Override
public List<FileInfo> list() {
return FILE_STORAGE;
}
@Override
public Resource getFile(String fileName) {
FILE_STORAGE.stream()
.filter(info -> info.getFileName().equals(fileName))
.findFirst()
.orElseThrow(() -> ne... | repos\springboot-demo-master\file\src\main\java\com\et\service\impl\FileUploadServiceImpl.java | 2 |
请完成以下Java代码 | public String getToActivityId() {
return toActivityId;
}
@Override
public ManyToOneMapping inParentProcessOfCallActivityId(String fromCallActivityId) {
this.fromCallActivityId = fromCallActivityId;
this.toCallActivityId = null;
this.callActivityPr... | return this;
}
@Override
public String getWithNewOwner() {
return withNewOwner;
}
@Override
public ManyToOneMapping withLocalVariable(String variableName, Object variableValue) {
withLocalVariables.put(variableName, variableValue);
re... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\migration\ActivityMigrationMapping.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class COL
{
public static COL of(final String data)
{
return new COL(new DATA(data));
}
@JsonProperty("DATA")
DATA data;
@JsonCreator
public COL(@JsonProperty("DATA") final DATA data)
{
this.data = data;
}
public String getValueAsString()
{
return data != null ? data.getValue() : null;
}
p... | try
{
return new BigDecimal(valueStr);
}
catch (final Exception e)
{
return null;
}
}
public Integer getValueAsInteger()
{
return getValue(COL::toInteger);
}
private static Integer toInteger(final String valueStr)
{
if (valueStr == null || valueStr.trim().isEmpty())
{
return null;
}
... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-filemaker\src\main\java\de\metas\common\filemaker\COL.java | 2 |
请完成以下Java代码 | public class CustomMultipartFile implements MultipartFile {
private byte[] input;
public CustomMultipartFile(byte[] input) {
this.input = input;
}
@Override
public String getName() {
return null;
}
@Override
public String getOriginalFilename() {
return null;
... | }
@Override
public long getSize() {
return input.length;
}
@Override
public byte[] getBytes() {
return input;
}
@Override
public InputStream getInputStream() {
return new ByteArrayInputStream(input);
}
@Override
public void transferTo(File destinat... | repos\tutorials-master\spring-web-modules\spring-mvc-file\src\main\java\com\baeldung\file\CustomMultipartFile.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ZuulRouteRefreshListener implements ApplicationListener<EnvironmentChangeEvent> {
private static final Logger logger = LoggerFactory.getLogger(ZuulRouteRefreshListener.class);
@Autowired
private ApplicationEventPublisher publisher;
@Autowired
private RouteLocator routeLocator;
@... | if (key.startsWith("zuul.")) {
zuulConfigUpdated = true;
break;
}
}
if (!zuulConfigUpdated) {
return;
}
// 发布 RoutesRefreshedEvent 事件
this.publisher.publishEvent(new RoutesRefreshedEvent(routeLocator));
logger.info(... | repos\SpringBoot-Labs-master\labx-21\labx-21-sc-zuul-demo03-config-nacos\src\main\java\cn\iocoder\springcloud\labx21\zuuldemo\ZuulRouteRefreshListener.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void prepareExternalStatusCreateRequest(@NonNull final Exchange exchange, @NonNull final JsonExternalStatus externalStatus)
{
final ScriptedImportConversionRestAPIContext context = ProcessorHelper.getPropertyOrThrowError(exchange, PROPERTY_SCRIPTED_SCRIPTED_IMPORTED_CONVERSION_CONTEXT, ScriptedImportConversi... | }
@Override
public String getExternalSystemTypeCode()
{
return SCRIPTED_IMPORT_CONVERSION_SYSTEM_NAME;
}
@Override
public String getEnableCommand()
{
return ENABLE_RESOURCE_ROUTE;
}
@Override
public String getDisableCommand()
{
return DISABLE_RESOURCE_ROUTE;
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-scriptedadapter\src\main\java\de\metas\camel\externalsystems\scriptedadapter\convertmsg\to_mf\ScriptedImportConversionRestAPIRouteBuilder.java | 2 |
请完成以下Java代码 | public Callable<String> getWithResilience4jTimeLimiter(@RequestParam String title) {
return TimeLimiter.decorateFutureSupplier(ourTimeLimiter, () -> CompletableFuture.supplyAsync(() -> getAuthor(title)));
}
@GetMapping("/author/mvc-request-timeout")
public Callable<String> getWithMvcRequestTimeout(... | @GetMapping("/author/restclient")
public String getWithRestClient(@RequestParam String title) {
return restClient.get()
.uri(uriBuilder -> uriBuilder.path("/author/transactional")
.queryParam("title", title)
.build())
.retrieve()
.body(Stri... | repos\tutorials-master\spring-web-modules\spring-rest-http\src\main\java\com\baeldung\requesttimeout\RequestTimeoutRestController.java | 1 |
请完成以下Java代码 | public Predicate<ServerWebExchange> apply(Config config) {
Pattern pattern = (StringUtils.hasText(config.regexp)) ? Pattern.compile(config.regexp) : null;
return new GatewayPredicate() {
@Override
public boolean test(ServerWebExchange exchange) {
if (!StringUtils.hasText(config.header)) {
return fal... | @NotEmpty
private @Nullable String header;
private @Nullable String regexp;
public @Nullable String getHeader() {
return header;
}
public Config setHeader(String header) {
this.header = header;
return this;
}
public @Nullable String getRegexp() {
return regexp;
}
public Config setRege... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\HeaderRoutePredicateFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PersistenceUnitTransactionType getTransactionType() {
return transactionType;
}
@Override
public DataSource getJtaDataSource() {
return jtaDataSource;
}
public PersistenceUnitInfoImpl setJtaDataSource(DataSource jtaDataSource) {
this.jtaDataSource = jtaDataSource;
... | }
@Override
public SharedCacheMode getSharedCacheMode() {
return SharedCacheMode.UNSPECIFIED;
}
@Override
public ValidationMode getValidationMode() {
return ValidationMode.AUTO;
}
public Properties getProperties() {
return properties;
}
@Override
p... | repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\daopattern\config\PersistenceUnitInfoImpl.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO (Properties ctx)
{
org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
return poi;
}
@Override
public org.compiere.model.I_C_OrderLine getC_OrderLine() throws RuntimeException
{
return get_ValueAsPO(CO... | public de.metas.esb.edi.model.I_EDI_Desadv getEDI_Desadv() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_EDI_Desadv_ID, de.metas.esb.edi.model.I_EDI_Desadv.class);
}
@Override
public void setEDI_Desadv(de.metas.esb.edi.model.I_EDI_Desadv EDI_Desadv)
{
set_ValueFromPO(COLUMNNAME_EDI_Desadv_ID, de.m... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_Desadv_NullDelivery_C_OrderLine_v.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JSONObject listAllPermission() {
List<JSONObject> permissions = userDao.listAllPermission();
return CommonUtil.successPage(permissions);
}
/**
* 添加角色
*/
@Transactional(rollbackFor = Exception.class)
@SuppressWarnings("unchecked")
public JSONObject addRole(JSONObject... | */
private void saveNewPermission(String roleId, Collection<Integer> newPerms, Collection<Integer> oldPerms) {
List<Integer> waitInsert = new ArrayList<>();
for (Integer newPerm : newPerms) {
if (!oldPerms.contains(newPerm)) {
waitInsert.add(newPerm);
}
... | repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\service\UserService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class KotlinProjectGenerationConfiguration {
private final ProjectDescription description;
public KotlinProjectGenerationConfiguration(ProjectDescription description) {
this.description = description;
}
@Bean
KotlinSourceCodeWriter kotlinSourceCodeWriter(IndentingWriterFactory indentingWriterFactory) {... | }
@Bean
@ConditionalOnBuildSystem(GradleBuildSystem.ID)
public GitIgnoreCustomizer kotlinGradlePluginGitIgnoreCustomizer() {
return (gitIgnore) -> {
GitIgnore.GitIgnoreSection section = gitIgnore.addSectionIfAbsent("Kotlin");
section.add(".kotlin");
};
}
@Bean
public KotlinProjectSettings kotlinProjec... | repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\code\kotlin\KotlinProjectGenerationConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public float getEvictionOffHeapPercentage() {
return this.evictionOffHeapPercentage;
}
public void setEvictionOffHeapPercentage(float evictionOffHeapPercentage) {
this.evictionOffHeapPercentage = evictionOffHeapPercentage;
}
public String getLogLevel() {
return this.logLevel;
}
public void setLogLevel(St... | }
public void setCompressorBeanName(String compressorBeanName) {
this.compressorBeanName = compressorBeanName;
}
public String[] getRegionNames() {
return this.regionNames;
}
public void setRegionNames(String[] regionNames) {
this.regionNames = regionNames;
}
}
public static class OffHeapProp... | 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代码 | private DeliveryOrderItem createDeliveryOrderItems(final PackageItem packageItem)
{
Check.assumeNotNull(packageItem.getQuantity(), "quantity must not be null, for packageItem " + packageItem);
final ProductId productId = packageItem.getProductId();
final I_M_Product product = productDAO.getById(productId);
fin... | .totalWeightInKg(weightInKg)
.shippedQuantity(packageItem.getQuantity())
.unitPrice(unitPrice)
.totalValue(totalPackageValue)
.build();
}
private Optional<BigDecimal> computeNominalGrossWeightInKg(final PackageItem packageItem)
{
final ProductId productId = packageItem.getProductId();
final Quan... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.nshift\src\main\java\de\metas\shipper\gateway\nshift\NShiftDraftDeliveryOrderCreator.java | 1 |
请完成以下Java代码 | public static List<List<Term>> seg2sentence(String text, boolean shortest)
{
return SEGMENT.seg2sentence(text, shortest);
}
/**
* 切分为句子形式
*
* @param text
* @param filterArrayChain 自定义过滤器链
* @return
*/
public static List<List<Term>> seg2sentence(String text, Filter.... | Term term = listIterator.next();
for (Filter filter : filterArrayChain)
{
if (!filter.shouldInclude(term))
{
listIterator.remove();
break;
}
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\tokenizer\NotionalTokenizer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonCacheStats
{
//
// Cache Info
long cacheId;
@NonNull String name;
@NonNull Set<String> labels;
@NonNull CacheMapType type;
int initialCapacity;
int maximumSize;
int expireMinutes;
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Nullable String debugAcquireStacktrace;
//
// Actual Stats
long... | .cacheId(stats.getCacheId())
.name(stats.getName())
.labels(stats.getLabels().stream()
.map(CacheLabel::getName)
.collect(ImmutableSet.toImmutableSet()))
.type(stats.getConfig().getCacheMapType())
.initialCapacity(stats.getConfig().getInitialCapacity())
.maximumSize(stats.getConfig().get... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\rest\JsonCacheStats.java | 2 |
请完成以下Java代码 | public int getC_Workplace_ExternalSystem_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Workplace_ExternalSystem_ID);
}
@Override
public void setC_Workplace_ID (final int C_Workplace_ID)
{
if (C_Workplace_ID < 1)
set_Value (COLUMNNAME_C_Workplace_ID, null);
else
set_Value (COLUMNNAME_C_Workplace_ID, C_W... | @Override
public void setExternalSystem_ID (final int ExternalSystem_ID)
{
if (ExternalSystem_ID < 1)
set_Value (COLUMNNAME_ExternalSystem_ID, null);
else
set_Value (COLUMNNAME_ExternalSystem_ID, ExternalSystem_ID);
}
@Override
public int getExternalSystem_ID()
{
return get_ValueAsInt(COLUMNNAME_E... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace_ExternalSystem.java | 1 |
请完成以下Java代码 | public void setTextValue2(String textValue2) {
this.textValue2 = textValue2;
}
public byte[] getByteValue() {
return byteValue;
}
public void setByteValue(byte[] byteValue) {
this.byteValue = byteValue;
}
public int getRevision() {
return revision;
}
public void setRevision(int revision)... | public String toString() {
return this.getClass().getSimpleName()
+ "[variableName=" + variableName
+ ", variableInstanceId=" + variableInstanceId
+ ", revision=" + revision
+ ", serializerName=" + serializerName
+ ", longValue=" + longValue
+ ", dou... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricVariableUpdateEventEntity.java | 1 |
请完成以下Java代码 | public void setTxCtgy(String value) {
this.txCtgy = value;
}
/**
* Gets the value of the saleRcncltnId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSaleRcncltnId() {
return saleRcncltnId;
}
/**
... | /**
* Sets the value of the seqNbRg property.
*
* @param value
* allowed object is
* {@link CardSequenceNumberRange1 }
*
*/
public void setSeqNbRg(CardSequenceNumberRange1 value) {
this.seqNbRg = value;
}
/**
* Gets the value of the txDtRg prope... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\CardAggregated1.java | 1 |
请完成以下Java代码 | private void checkNotValidCharactersInVariableName(String name, String errorMsg) {
if (!variableNameValidator.validate(name)) {
throw new IllegalStateException(errorMsg + (name != null ? name : "null"));
}
}
public CreateTaskVariablePayload handleCreateTaskVariablePayload(
C... | return updateTaskVariablePayload;
}
public Map<String, Object> handlePayloadVariables(Map<String, Object> variables) {
if (variables != null) {
Set<String> mismatchedVars = variableNameValidator.validateVariables(variables);
if (!mismatchedVars.isEmpty()) {
thro... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-task-runtime-impl\src\main\java\org\activiti\runtime\api\impl\TaskVariablesPayloadValidator.java | 1 |
请完成以下Java代码 | private Iterator<I_M_ReceiptSchedule> retrieveReceiptSchedules(final ProcessInfo pi)
{
return Services.get(IQueryBL.class).createQueryBuilder(I_M_ReceiptSchedule.class, pi.getCtx(), ITrx.TRXNAME_None)
// Filter by process info selection
.filter(new ProcessInfoSelectionQueryFilter<I_M_ReceiptSchedule>(pi))
... | //
.iterate(I_M_ReceiptSchedule.class);
}
@Override
public List<IHUDocument> createHUDocumentsFromModel(final Object model)
{
final I_M_ReceiptSchedule schedule = InterfaceWrapperHelper.create(model, I_M_ReceiptSchedule.class);
final List<IHUDocument> subsequentDocuments = null; // we don't care for subs... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\receiptschedule\impl\ReceiptScheduleHUDocumentFactory.java | 1 |
请完成以下Java代码 | public InputMethodRequests getInputMethodRequests()
{
return m_textPane.getInputMethodRequests();
}
/**
* Set Input Verifier
* @param l verifyer
*/
@Override
public void setInputVerifier (InputVerifier l)
{
m_textPane.setInputVerifier(l);
}
// metas: begin
public String getContentType()
{
if (m_t... | {
log.warn("Cannot instantiate hyperlink listener - " + hyperlinkListenerClass, e);
}
}
private static Class<?> hyperlinkListenerClass;
static
{
final String hyperlinkListenerClassname = "de.metas.adempiere.gui.ADHyperlinkHandler";
try
{
hyperlinkListenerClass = Thread.currentThread().getContextClas... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTextPane.java | 1 |
请完成以下Java代码 | public int hashCode() {
return Objects.hashCode(loginName);
}
/**
* 重载equals,只计算loginName;
*/
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
} | if (getClass() != obj.getClass()) {
return false;
}
ShiroUser other = (ShiroUser) obj;
if (loginName == null) {
if (other.loginName != null) {
return false;
}
} else if (!loginName.equals(other.loginName)) {
return false;
... | repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\ShiroUser.java | 1 |
请完成以下Java代码 | public static TypedValue untypedValue(Object value, boolean isTransient) {
if(value == null) {
return untypedNullValue(isTransient);
} else if (value instanceof TypedValueBuilder<?>) {
return ((TypedValueBuilder<?>) value).setTransient(isTransient).create();
} else if (value instanceof TypedValu... | * The name is set to the file name and the mime type is detected via {@link MimetypesFileTypeMap}.
*/
public static FileValue fileValue(File file){
String contentType = MimetypesFileTypeMap.getDefaultFileTypeMap().getContentType(file);
return new FileValueBuilderImpl(file.getName()).file(file).mimeType(con... | repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\Variables.java | 1 |
请完成以下Java代码 | private Map<AggregationItemId, AggregationItem> createAggregationItem_TypeAttribute(final I_C_AggregationItem aggregationItemDef)
{
final I_C_Aggregation_Attribute attributeDef = aggregationItemDef.getC_Aggregation_Attribute();
if (attributeDef == null || attributeDef.getC_Aggregation_Attribute_ID() <= 0)
{
t... | return ImmutableMap.of(aggregationItem.getId(), aggregationItem);
}
/**
*
* @return true if aggregation is eligible and shall be considered
* @throws AdempiereException if aggregation is not eligible and this is not acceptable
*/
private boolean checkEligible(final I_C_Aggregation aggregationDef)
{
if (a... | repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\api\impl\C_Aggregation2AggregationBuilder.java | 1 |
请完成以下Java代码 | public List<VariableInstanceEntity> getQueryVariables() {
if (queryVariables == null && Context.getCommandContext() != null) {
queryVariables = new VariableInitializingList();
}
return queryVariables;
}
public void setQueryVariables(List<VariableInstanceEntity> queryVariable... | return this.appVersion;
}
public void setAppVersion(Integer appVersion) {
this.appVersion = appVersion;
}
public String toString() {
return "Task[id=" + id + ", name=" + name + "]";
}
private String truncate(String string, int maxLength) {
if (string != null) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TaskEntityImpl.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.