instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public String sendTx() {
String transactionHash = "";
try {
List inputParams = new ArrayList();
List outputParams = new ArrayList();
Function function = new Function("fuctionName", inputParams, outputParams);
String encodedFunction = FunctionEncoder.enco... | System.out.println(PLEASE_SUPPLY_REAL_DATA);
return PLEASE_SUPPLY_REAL_DATA;
}
return transactionHash;
}
} | repos\tutorials-master\ethereum\src\main\java\com\baeldung\web3j\services\Web3Service.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final AuthorRepository authorRepository;
private Author author;
public BookstoreService(AuthorRepository authorRepository) {
this.authorRepository = authorRepository;
}
public void authorNotEqualsProxy() {
// behind findById() we have Enti... | System.out.println("Author class: " + author.getClass().getName());
System.out.println("Proxy class: " + proxy.getClass().getName());
System.out.println("'author' equals 'proxy'? " + author.equals(proxy));
}
@Transactional(readOnly = true)
public void authorEqualsUnproxy() {
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootUnproxyAProxy\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public OAuth2ClientRegistrationTemplate toData() {
OAuth2ClientRegistrationTemplate clientRegistrationTemplate = new OAuth2ClientRegistrationTemplate();
clientRegistrationTemplate.setId(new OAuth2ClientRegistrationTemplateId(id));
clientRegistrationTemplate.setCreatedTime(createdTime);
c... | );
clientRegistrationTemplate.setAuthorizationUri(authorizationUri);
clientRegistrationTemplate.setAccessTokenUri(tokenUri);
clientRegistrationTemplate.setScope(Arrays.asList(scope.split(",")));
clientRegistrationTemplate.setUserInfoUri(userInfoUri);
clientRegistrationTemplate.se... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\OAuth2ClientRegistrationTemplateEntity.java | 1 |
请完成以下Java代码 | public class MessageEventDefinition extends EventDefinition {
protected String messageRef;
protected String messageExpression;
public String getMessageRef() {
return messageRef;
}
public void setMessageRef(String messageRef) {
this.messageRef = messageRef;
}
public String... | public void setMessageExpression(String messageExpression) {
this.messageExpression = messageExpression;
}
@Override
public MessageEventDefinition clone() {
MessageEventDefinition clone = new MessageEventDefinition();
clone.setValues(this);
return clone;
}
public vo... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\MessageEventDefinition.java | 1 |
请完成以下Java代码 | public class SimulatedAnnealing {
private static Travel travel = new Travel(10);
public static double simulateAnnealing(double startingTemperature, int numberOfIterations, double coolingRate) {
System.out.println("Starting SA with temperature: " + startingTemperature + ", # of iterations: " + numberOf... | bestDistance = currentDistance;
} else if (Math.exp((bestDistance - currentDistance) / t) < Math.random()) {
currentSolution.revertSwap();
}
t *= coolingRate;
} else {
continue;
}
if (i % 100 == 0) {
... | repos\tutorials-master\algorithms-modules\algorithms-genetic\src\main\java\com\baeldung\algorithms\ga\annealing\SimulatedAnnealing.java | 1 |
请完成以下Java代码 | public void onStateTransition(CommandContext commandContext, DelegatePlanItemInstance planItemInstance, String transition) {
}
@Override
public void execute(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {
if (planItemInstanceEntity.getPlanItemDefinition() instanceof... | CommandContextUtil.getCmmnEngineConfiguration(commandContext).getListenerNotificationHelper().executeLifecycleListeners(
commandContext, planItemInstanceEntity, PlanItemInstanceState.ACTIVE, PlanItemInstanceState.AVAILABLE);
} else {
CommandContextUti... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\UserEventListenerActivityBehaviour.java | 1 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
final ModelElementTypeBuilder typeBuilder =
modelBuilder
.defineType(Category.class, BPMN_ELEMENT_CATEGORY)
.namespaceUri(BPMN20_NS)
.extendsType(RootElement.class)
.instanceProvider(
... | @Override
public String getName() {
return nameAttribute.getValue(this);
}
@Override
public void setName(String name) {
nameAttribute.setValue(this, name);
}
@Override
public Collection<CategoryValue> getCategoryValues() {
return categoryValuesCollection.get(this);
}
} | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CategoryImpl.java | 1 |
请完成以下Java代码 | public class CommonsDbcp2DataSourcePoolMetadata extends AbstractDataSourcePoolMetadata<BasicDataSource> {
public CommonsDbcp2DataSourcePoolMetadata(BasicDataSource dataSource) {
super(dataSource);
}
@Override
public @Nullable Integer getActive() {
return getDataSource().getNumActive();
}
@Override
public ... | }
@Override
public @Nullable Integer getMin() {
return getDataSource().getMinIdle();
}
@Override
public @Nullable String getValidationQuery() {
return getDataSource().getValidationQuery();
}
@Override
public @Nullable Boolean getDefaultAutoCommit() {
return getDataSource().getDefaultAutoCommit();
}
} | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\metadata\CommonsDbcp2DataSourcePoolMetadata.java | 1 |
请完成以下Java代码 | public static final PostingExecutionException wrapIfNeeded(final Throwable throwable)
{
if (throwable == null)
{
return null;
}
else if (throwable instanceof PostingExecutionException)
{
return (PostingExecutionException)throwable;
}
else
{
final Throwable cause = extractCause(throwable);
i... | private PostingExecutionException(final String message, final Throwable cause)
{
super(message, cause);
setIssueCategory(IssueCategory.ACCOUNTING);
}
private static final String buildMessage(final String message, final String serverStackTrace)
{
final StringBuilder sb = new StringBuilder();
sb.append(!Chec... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\acct\PostingExecutionException.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDATE1() {
return date1;
}
/**
* Sets the value of the date1 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDATE1(String value) {
this.date1 = value;
}
/**
* Gets the value o... | * @param value
* allowed object is
* {@link String }
*
*/
public void setDATE4(String value) {
this.date4 = value;
}
/**
* Gets the value of the date5 property.
*
* @return
* possible object is
* {@link String }
*
*/
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DPLQU1.java | 2 |
请完成以下Java代码 | protected String getTargetTableName()
{
return I_C_Flatrate_Term.Table_Name;
}
@Override
protected String getImportOrderBySql()
{
return I_I_Flatrate_Term.COLUMNNAME_I_Flatrate_Term_ID;
}
@Override
protected void updateAndValidateImportRecordsImpl()
{
final ImportRecordsSelection selection = getImportR... | flatRateImporter.importRecord(importRecord);
return ImportRecordResult.Inserted;
}
@Override
protected void markImported(final I_I_Flatrate_Term importRecord)
{
// NOTE: overriding the method from abstract class because in case of I_Flatrate_Term,
// * the I_IsImported is a List (as it should be) and not Yes... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\impexp\FlatrateTermImportProcess.java | 1 |
请完成以下Java代码 | public long findLargestPowerOf2LessThanTheGivenNumberUsingLogBase2(long input) {
Assert.isTrue(input > 1, "Invalid input");
long temp = input;
if (input % 2 == 0) {
temp = input - 1;
}
// Find log base 2 of a given number
long power = (long) (Math.log(temp) ... | }
}
return result;
}
public long findLargestPowerOf2LessThanTheGivenNumberUsingBitShiftApproach(long input) {
Assert.isTrue(input > 1, "Invalid input");
long result = 1;
long powerOf2;
for (long i = 0; i < Long.BYTES * 8; i++) {
powerOf2 = 1 << i;
... | repos\tutorials-master\core-java-modules\core-java-lang-math-2\src\main\java\com\baeldung\algorithms\largestpowerof2\LargestPowerOf2.java | 1 |
请完成以下Java代码 | private MigrationScriptFileLogger getWriter()
{
final MigrationScriptFileLogger temporaryLogger = temporaryMigrationScriptWriterHolder.get();
return temporaryLogger != null ? temporaryLogger : _pgMigrationScriptWriter;
}
public static Optional<Path> getCurrentScriptPathIfPresent()
{
return getWriter().getFil... | {
return true;
}
//
// Don't log DELETE FROM Some_Table WHERE AD_Table_ID=? AND Record_ID=?
if (sqlCommandUC.startsWith("DELETE FROM ") && sqlCommandUC.endsWith(" WHERE AD_TABLE_ID=? AND RECORD_ID=?"))
{
return true;
}
//
// Check that INSERT/UPDATE/DELETE statements are about our ignored tables... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\logger\MigrationScriptFileLoggerHolder.java | 1 |
请完成以下Java代码 | public static String decrypt(String ciphertext, String password, String salt) {
Key key = getPbeKey(password);
byte[] passDec = null;
PBEParameterSpec parameterSpec = new PBEParameterSpec(salt.getBytes(), ITERATIONCOUNT);
try {
Cipher cipher = Cipher.getInstance(ALGORITHM);
cipher.init(Cipher.DECRYPT_MO... | * @param hexString
* 十六进制字符串
* @return
*/
public static byte[] hexStringToBytes(String hexString) {
if (hexString == null || "".equals(hexString)) {
return null;
}
hexString = hexString.toUpperCase();
int length = hexString.length() / 2;
char[] hexChars = hexString.toCharArray();
byte[]... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\PasswordUtil.java | 1 |
请完成以下Java代码 | private void refreshFromSource(PO sourcePO, int changeType)
{
final String sourceTableName = sourcePO.get_TableName();
final ITableMViewBL mviewBL = Services.get(ITableMViewBL.class);
for (I_AD_Table_MView mview : mviewBL.fetchAll(Env.getCtx()))
{
MViewMetadata mdata = mviewBL.getMetadata(mview);
if (m... | {
final ITableMViewBL mviewBL = Services.get(ITableMViewBL.class);
MViewMetadata mdata = mviewBL.getMetadata(mview);
if (mdata == null)
{
// no metadata found => IGNORE
if (invalidateIfNecessary)
{
mview.setIsValid(false);
InterfaceWrapperHelper.save(mview);
}
return false;
}
for (Str... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\engine\MViewModelValidator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DataEntryRestController
{
private static final transient Logger log = LogManager.getLogger(DataEntryRestController.class);
private final DataEntryLayoutRepository layoutRepo;
private final DataEntryRecordCache dataRecords;
DataEntryRestController(
@NonNull final DataEntryLayoutRepository layoutRep... | }
@VisibleForTesting
ResponseEntity<JsonDataEntryResponse> getByRecordId0(final AdWindowId windowId, final int recordId, final String adLanguage)
{
final DataEntryLayout layout = layoutRepo.getByWindowId(windowId);
if (layout.isEmpty())
{
return JsonDataEntryResponse.notFound(String.format("No dataentry fo... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\dataentry\impl\DataEntryRestController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private static <B extends HttpSecurityBuilder<B>> OAuth2AuthorizedClientService getAuthorizedClientServiceBean(
B builder) {
Map<String, OAuth2AuthorizedClientService> authorizedClientServiceMap = BeanFactoryUtils
.beansOfTypeIncludingAncestors(builder.getSharedObject(ApplicationContext.class),
OAuth2Autho... | if (sessionRegistry != null) {
return sessionRegistry;
}
ApplicationContext context = builder.getSharedObject(ApplicationContext.class);
if (context.getBeanNamesForType(OidcSessionRegistry.class).length == 1) {
sessionRegistry = context.getBean(OidcSessionRegistry.class);
}
else {
sessionRegistry = n... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\client\OAuth2ClientConfigurerUtils.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected final B getBuilder() {
Assert.state(this.securityBuilder != null, "securityBuilder cannot be null");
return this.securityBuilder;
}
/**
* Performs post processing of an object. The default is to delegate to the
* {@link ObjectPostProcessor}.
* @param object the Object to post process
* @return ... | @SuppressWarnings({ "rawtypes", "unchecked" })
public Object postProcess(Object object) {
for (ObjectPostProcessor opp : this.postProcessors) {
Class<?> oppClass = opp.getClass();
Class<?> oppType = GenericTypeResolver.resolveTypeArgument(oppClass, ObjectPostProcessor.class);
if (oppType == null || opp... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\SecurityConfigurerAdapter.java | 2 |
请完成以下Java代码 | private List<I_C_CountryArea_Assign> retrieveCountryAreaAssignments(final I_C_CountryArea countryArea, final int countryId)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(countryArea);
final String trxName = InterfaceWrapperHelper.getTrxName(countryArea);
final int countryAreaId = countryArea.getC_Countr... | }
if (newEntry.getValidFrom().compareTo(oldEntry.getValidFrom()) <= 0)
{
return (newEntry.getValidTo() == null) || (newEntry.getValidTo().compareTo(oldEntry.getValidFrom()) > 0);
}
else
{
return (oldEntry.getValidTo() == null) || (oldEntry.getValidTo().compareTo(newEntry.getValidFrom()) > 0);
}
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impl\CountryAreaBL.java | 1 |
请完成以下Java代码 | protected void ensureResourcesWithIdsExist(String deploymentId, Set<String> expectedIds, List<ResourceEntity> actual) {
Map<String, ResourceEntity> resources = new HashMap<>();
for (ResourceEntity resource : actual) {
resources.put(resource.getId(), resource);
}
ensureResourcesWithKeysExist(deploy... | protected void ensureResourcesWithKeysExist(String deploymentId, Set<String> expectedKeys, Map<String, ResourceEntity> actual, String valueProperty) {
List<String> missingResources = getMissingElements(expectedKeys, actual);
if (!missingResources.isEmpty()) {
StringBuilder builder = new StringBuilder();
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\DeployCmd.java | 1 |
请完成以下Java代码 | public void setUserDetailsChecker(UserDetailsChecker userDetailsChecker) {
this.userDetailsChecker = userDetailsChecker;
}
/**
* Allows the parameter containing the username to be customized.
* @param usernameParameter the parameter name. Defaults to {@code username}
*/
public void setUsernameParameter(Stri... | * Sets the {@link SecurityContextRepository} to save the {@link SecurityContext} on
* switch user success. The default is
* {@link RequestAttributeSecurityContextRepository}.
* @param securityContextRepository the {@link SecurityContextRepository} to use.
* Cannot be null.
* @since 5.7.7
*/
public void set... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\switchuser\SwitchUserFilter.java | 1 |
请完成以下Java代码 | public static void writeDocument(final Writer writer, final Node node)
{
// Construct Transformer Factory and Transformer
final TransformerFactory tranFactory = TransformerFactory.newInstance();
Transformer aTransformer;
try
{
aTransformer = tranFactory.newTransformer();
}
catch (final TransformerCon... | final Source src = new DOMSource(node);
// =================================== Write to String
// Writer writer = new StringWriter();
final Result dest2 = new StreamResult(writer);
try
{
aTransformer.transform(src, dest2);
}
catch (final TransformerException e)
{
throw new AdempiereException(e);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\process\rpl\XMLHelper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void putMediaConvertCache(String key, String value) {
mediaConvertCache.put(key, value);
}
@Override
public String getMediaConvertCache(String key) {
return mediaConvertCache.get(key);
}
@Override
public void cleanCache() {
initPDFCachePool(CacheService.DEFAULT_P... | .build();
}
@Override
public void initIMGCachePool(Integer capacity) {
imgCache = new ConcurrentLinkedHashMap.Builder<String, List<String>>()
.maximumWeightedCapacity(capacity).weigher(Weighers.singleton())
.build();
}
@Override
public void initPdfImages... | repos\kkFileView-master\server\src\main\java\cn\keking\service\cache\impl\CacheServiceJDKImpl.java | 2 |
请完成以下Java代码 | public class SetParameterRequestWrapper extends HttpServletRequestWrapper {
private final Map<String, String[]> paramMap;
public SetParameterRequestWrapper(HttpServletRequest request) {
super(request);
paramMap = new HashMap<>(request.getParameterMap());
}
@Override
public Map<Str... | .map(values -> Arrays.copyOf(values, values.length))
.orElse(null);
}
@Override
public String getParameter(String name) {
return Optional.ofNullable(getParameterValues(name))
.map(values -> values[0])
.orElse(null);
}
public void setParameter(String name... | repos\tutorials-master\web-modules\jakarta-servlets\src\main\java\com\baeldung\setparam\SetParameterRequestWrapper.java | 1 |
请完成以下Java代码 | public Element setLang(String lang)
{
addAttribute("lang",lang);
addAttribute("xml:lang",lang);
return this;
}
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
... | Adds an Element to the element.
@param element Adds an Element to the element.
*/
public blink addElement(Element element)
{
addElementToRegistry(element);
return(this);
}
/**
Adds an Element to the element.
@param element Adds an Element to the... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\blink.java | 1 |
请完成以下Java代码 | public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setSectionName (final java.lang.String SectionName)
{
set_Value (COLUMNNAME_SectionName, SectionName... | {
return get_ValueAsString(COLUMNNAME_SectionName);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Section.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyOrdered ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Region.
@param RegionName
Name of the Region
*/
public void setRegionName (String RegionName)
{
set_Value (COLUMNNAME_RegionName, RegionName... | /** Get SKU.
@return Stock Keeping Unit
*/
public String getSKU ()
{
return (String)get_Value(COLUMNNAME_SKU);
}
/** Set Tax Amount.
@param TaxAmt
Tax Amount for a document
*/
public void setTaxAmt (BigDecimal TaxAmt)
{
set_Value (COLUMNNAME_TaxAmt, TaxAmt);
}
/** Get Tax Amount.
@return T... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Invoice.java | 1 |
请完成以下Java代码 | public java.sql.Timestamp getCreated_Print_Job_Instructions()
{
return get_ValueAsTimestamp(COLUMNNAME_Created_Print_Job_Instructions);
}
@Override
public void setPrintServiceName (java.lang.String PrintServiceName)
{
set_ValueNoCheck (COLUMNNAME_PrintServiceName, PrintServiceName);
}
@Override
public ja... | @Override
public void setUpdatedby_Print_Job_Instructions (int Updatedby_Print_Job_Instructions)
{
set_ValueNoCheck (COLUMNNAME_Updatedby_Print_Job_Instructions, Integer.valueOf(Updatedby_Print_Job_Instructions));
}
@Override
public int getUpdatedby_Print_Job_Instructions()
{
return get_ValueAsInt(COLUMNNAM... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Printing_Queue_PrintInfo_v.java | 1 |
请完成以下Java代码 | public class ClusterServerModifyRequest implements ClusterModifyRequest {
private String app;
private String ip;
private Integer port;
private Integer mode;
private ServerFlowConfig flowConfig;
private ServerTransportConfig transportConfig;
private Set<String> namespaceSet;
@Override
... | this.flowConfig = flowConfig;
return this;
}
public ServerTransportConfig getTransportConfig() {
return transportConfig;
}
public ClusterServerModifyRequest setTransportConfig(
ServerTransportConfig transportConfig) {
this.transportConfig = transportConfig;
retu... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\cluster\request\ClusterServerModifyRequest.java | 1 |
请完成以下Java代码 | public void setAD_Printer_Config_Shared_ID (int AD_Printer_Config_Shared_ID)
{
if (AD_Printer_Config_Shared_ID < 1)
set_Value (COLUMNNAME_AD_Printer_Config_Shared_ID, null);
else
set_Value (COLUMNNAME_AD_Printer_Config_Shared_ID, Integer.valueOf(AD_Printer_Config_Shared_ID));
}
@Override
public int get... | }
@Override
public boolean isSharedPrinterConfig()
{
return get_ValueAsBoolean(COLUMNNAME_IsSharedPrinterConfig);
}
@Override
public org.compiere.model.I_C_Workplace getC_Workplace()
{
return get_ValueAsPO(COLUMNNAME_C_Workplace_ID, org.compiere.model.I_C_Workplace.class);
}
@Override
public void setC... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_Printer_Config.java | 1 |
请完成以下Java代码 | public ExecuteReportResult executeReport(
@NonNull final ProcessInfo processInfo,
@NonNull final OutputType outputType)
{
final DunningDocId dunningDocId = DunningDocId.ofRepoId(processInfo.getRecord_ID());
final Resource dunningDocData = ExecuteReportStrategyUtil.executeJasperProcess(dunningDocJasperProces... | }
private List<PdfDataProvider> retrieveAdditionalDataItems(@NonNull final List<I_C_Invoice> dunnedInvoices)
{
final ImmutableList.Builder<PdfDataProvider> result = ImmutableList.builder();
for (final I_C_Invoice invoice : dunnedInvoices)
{
final TableRecordReference invoiceRef = TableRecordReference.of(inv... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\process\C_DunningDoc_JasperWithInvoicePDFsStrategy.java | 1 |
请完成以下Java代码 | public void setDescription(String description) {
this.description = description;
}
public String getId() {
return this.id;
}
public ServiceCapabilityType getType() {
return this.type;
}
/**
* Return the "content" of this capability. The structure of the content vastly
* depends on the {@link ServiceC... | * additional content.
* @param other the content to merge
*/
public void merge(ServiceCapability<T> other) {
Assert.notNull(other, "Other must not be null");
Assert.isTrue(this.id.equals(other.id), "Ids must be equals");
Assert.isTrue(this.type.equals(other.type), "Types must be equals");
if (StringUtils.h... | repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\ServiceCapability.java | 1 |
请完成以下Java代码 | public class DelegatingJwtGrantedAuthoritiesConverter implements Converter<Jwt, Collection<GrantedAuthority>> {
private final Collection<Converter<Jwt, Collection<GrantedAuthority>>> authoritiesConverters;
/**
* Constructs a {@link DelegatingJwtGrantedAuthoritiesConverter} using the provided
* {@link Collection... | * @param jwt The {@link Jwt} token
* @return The {@link GrantedAuthority authorities} read from the token scopes
*/
@Override
public Collection<GrantedAuthority> convert(Jwt jwt) {
Collection<GrantedAuthority> result = new LinkedHashSet<>();
for (Converter<Jwt, Collection<GrantedAuthority>> authoritiesConver... | repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\authentication\DelegatingJwtGrantedAuthoritiesConverter.java | 1 |
请完成以下Java代码 | public void deleteAll() {
repository.deleteAll();
}
public List<S> saveAll(Iterable<S> entities) {
return repository.saveAll(entities);
}
public List<S> findAll() {
return repository.findAll();
}
public Optional<S> getUserByIdWithPredicate(long id, Predicate<S> predica... | }
public int getUserByIdWithFunction(Long id, ToIntFunction<S> function) {
Optional<S> optionalUser = repository.findById(id);
if (optionalUser.isPresent()) {
return function.applyAsInt(optionalUser.get());
} else {
return 0;
}
}
public void save(S ... | repos\tutorials-master\persistence-modules\spring-boot-persistence-2\src\main\java\com\baeldung\listvsset\Service.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public I_M_ShipmentSchedule getByIdAsRecord(@NonNull final ShipmentScheduleId id)
{
return huShipmentScheduleBL.getById(id);
}
public Quantity getQtyToDeliver(@NonNull final I_M_ShipmentSchedule schedule)
{
return huShipmentScheduleBL.getQtyToDeliver(schedule);
}
public Quantity getQtyScheduledForPicking(@N... | {
huShipmentScheduleBL.deleteByTopLevelHUsAndShipmentScheduleId(topLevelHUs, shipmentScheduleId);
}
public Stream<Packageable> stream(@NonNull final PackageableQuery query)
{
return packagingDAO.stream(query);
}
public Quantity getQtyRemainingToScheduleForPicking(@NonNull final I_M_ShipmentSchedule shipmentS... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\external\shipmentschedule\PickingJobShipmentScheduleService.java | 2 |
请完成以下Java代码 | public List<String> getMessageParts() {
if (message == null) {
return null;
}
List<String> messageParts = new ArrayList<String>();
String[] parts = MESSAGE_PARTS_MARKER_REGEX.split(message);
for (String part : parts) {
if ("null".equals(part)) {
... | }
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getFullMessage() {
return fullMessage... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\CommentEntityImpl.java | 1 |
请完成以下Spring Boot application配置 | #
# use this port on order to not collide with the ports of other metasfresh services that might run in the same box
# also note that this is the port that we have to app in the default docker-compose.yml
server.port=8282
#
# Tomcat
#
server.servlet.encoding.charset=UTF-8
server.servlet.encoding.force-response=true
#... | ----------
# Elasticsearch
# --------------------------------------------------------------------------------
metasfresh.elasticsearch.host=search:9200
# --------------------------------------------------------------------------------
# RabbitMQ
# -----------------------------------------------------------------------... | repos\metasfresh-new_dawn_uat\backend\metasfresh-dist\base\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public static String toUUIDString(final I_PMM_Product pmmProduct)
{
return UUIDs.fromIdAsString(pmmProduct.getPMM_Product_ID());
}
public static int getPMM_Product_ID(final String uuid)
{
return UUIDs.toId(uuid);
}
public static String toUUIDString(final I_C_Flatrate_Term contract)
{
return UUIDs.fromIdA... | public static String toUUIDString(final I_C_RfQResponseLine rfqResponseLine)
{
return toC_RfQReponseLine_UUID(rfqResponseLine.getC_RfQResponseLine_ID());
}
public static String toC_RfQReponseLine_UUID(final int C_RfQResponseLine_ID)
{
return UUIDs.fromIdAsString(C_RfQResponseLine_ID);
}
public static int ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\impl\SyncUUIDs.java | 1 |
请完成以下Java代码 | static class SpringCacheWrapper implements Cache {
private org.springframework.cache.Cache springCache;
SpringCacheWrapper(org.springframework.cache.Cache springCache) {
this.springCache = springCache;
}
@Override
public Object get(Object key) throws CacheException {
Object value = springCache.get(key... | public Set keys() {
if (springCache.getNativeCache() instanceof Ehcache) {
Ehcache ehcache = (Ehcache) springCache.getNativeCache();
return new HashSet(ehcache.getKeys());
}
throw new UnsupportedOperationException("invoke spring cache abstract keys method not supported");
}
@SuppressWarnings("unch... | repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\permission\shiro\spring\SpringCacheManagerWrapper.java | 1 |
请完成以下Java代码 | public static Period detectAndParse(String value) {
return detectAndParse(value, null);
}
/**
* Detect the style then parse the value to return a period.
* @param value the value to parse
* @param unit the period unit to use if the value doesn't specify one ({@code null}
* will default to ms)
* @return t... | }
private Period parse(String value) {
return this.factory.apply(Integer.parseInt(value));
}
private String print(Period value) {
return intValue(value) + this.suffix;
}
private boolean isZero(Period value) {
return intValue(value) == 0;
}
private int intValue(Period value) {
Assert.state(... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\convert\PeriodStyle.java | 1 |
请完成以下Java代码 | public void setPicking_User_ID (final int Picking_User_ID)
{
if (Picking_User_ID < 1)
set_Value (COLUMNNAME_Picking_User_ID, null);
else
set_Value (COLUMNNAME_Picking_User_ID, Picking_User_ID);
}
@Override
public int getPicking_User_ID()
{
return get_ValueAsInt(COLUMNNAME_Picking_User_ID);
}
@Ov... | @Override
public java.sql.Timestamp getPreparationDate()
{
return get_ValueAsTimestamp(COLUMNNAME_PreparationDate);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Job.java | 1 |
请完成以下Java代码 | public Thread createUserThread(final Runnable runnable, final String threadName)
{
return getCurrentInstance().createUserThread(runnable, threadName);
}
@Override
public String getClientInfo()
{
return getCurrentInstance().getClientInfo();
}
/**
* This method does nothing.
*
* @deprecated please chec... | @Override
public IClientUIInvoker invoke()
{
return getCurrentInstance().invoke();
}
@Override
public IClientUIAsyncInvoker invokeAsync()
{
return getCurrentInstance().invokeAsync();
}
@Override
public void showURL(String url)
{
getCurrentInstance().showURL(url);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUI.java | 1 |
请完成以下Java代码 | public String getAddress() {
return super.getAddress();
}
@Schema(description = "Address Line 2", example = "")
@Override
public String getAddress2() {
return super.getAddress2();
}
@Schema(description = "Zip code", example = "10004")
@Override
public String getZip() {
... | }
@Override
@JsonProperty(access = Access.READ_ONLY)
@Schema(description = "Name of the customer. Read-only, duplicated from title for backward compatibility", example = "Company A", accessMode = Schema.AccessMode.READ_ONLY)
public String getName() {
return title;
}
@Override
publi... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Customer.java | 1 |
请完成以下Java代码 | public void setAD_Column(final org.compiere.model.I_AD_Column AD_Column)
{
set_ValueFromPO(COLUMNNAME_AD_Column_ID, org.compiere.model.I_AD_Column.class, AD_Column);
}
@Override
public void setAD_Column_ID (final int AD_Column_ID)
{
if (AD_Column_ID < 1)
set_Value (COLUMNNAME_AD_Column_ID, null);
else
... | }
@Override
public void setWEBUI_Board(final de.metas.ui.web.base.model.I_WEBUI_Board WEBUI_Board)
{
set_ValueFromPO(COLUMNNAME_WEBUI_Board_ID, de.metas.ui.web.base.model.I_WEBUI_Board.class, WEBUI_Board);
}
@Override
public void setWEBUI_Board_ID (final int WEBUI_Board_ID)
{
if (WEBUI_Board_ID < 1)
se... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_Board_CardField.java | 1 |
请完成以下Java代码 | protected boolean isOrderByCreateTimeEnabled() {
return clientConfiguration.getOrderByCreateTime() != null;
}
protected boolean isUseCreateTimeEnabled() {
return Boolean.TRUE.equals(clientConfiguration.getUseCreateTime());
}
protected void checkForCreateTimeMisconfiguration() {
if (isUseCreateTime... | }
protected void close() {
if (client != null) {
client.stop();
}
}
@Autowired(required = false)
protected void setPropertyConfigurer(PropertySourcesPlaceholderConfigurer configurer) {
PropertySources appliedPropertySources = configurer.getAppliedPropertySources();
propertyResolver = new... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\client\ClientFactory.java | 1 |
请完成以下Java代码 | public class SimplePage implements Paginable {
private static final long serialVersionUID = 1L;
public static final int DEF_COUNT = 20;
public SimplePage() {
}
public SimplePage(int pageNo, int pageSize, int totalCount) {
if (totalCount <= 0) {
this.totalCount = 0;
} else {
this.totalCount = totalCount... | }
public int getNextPage() {
if (isLastPage()) {
return pageNo;
} else {
return pageNo + 1;
}
}
public int getPrePage() {
if (isFirstPage()) {
return pageNo;
} else {
return pageNo - 1;
}
}
protected int totalCount = 0;
protected int pageSize = 20;
protected int pageNo = 1;
public vo... | repos\springboot-demo-master\elasticsearch\src\main\java\demo\et59\elaticsearch\page\SimplePage.java | 1 |
请完成以下Java代码 | private void loadNextPage()
{
final TypedSqlQuery<T> queryToUse;
query.setLimit(QueryLimit.ofInt(bufferSize));
if (Check.isEmpty(rowNumberColumn, true))
{
query.setLimit(QueryLimit.ofInt(bufferSize), offset);
queryToUse = query;
}
else
{
query.setLimit(QueryLimit.ofInt(bufferSize));
queryToU... | /**
* Sets buffer/page size, i.e. the number of rows to be loaded by this iterator at a time.
*
* @see IQuery#OPTION_GuaranteedIteratorRequired
*/
public void setBufferSize(final int bufferSize)
{
Check.assume(bufferSize > 0, "bufferSize > 0");
this.bufferSize = bufferSize;
}
public int getBufferSize()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\POBufferedIterator.java | 1 |
请完成以下Java代码 | public class CommonMixedErrorHandler implements CommonErrorHandler {
private final CommonErrorHandler recordErrorHandler;
private final CommonErrorHandler batchErrorHandler;
/**
* Construct an instance with the provided delegate {@link CommonErrorHandler}s.
* @param recordErrorHandler the error handler for re... | MessageListenerContainer container) {
this.recordErrorHandler.handleRemaining(thrownException, records, consumer, container);
}
@Override
public void handleBatch(Exception thrownException, ConsumerRecords<?, ?> data, Consumer<?, ?> consumer,
MessageListenerContainer container, Runnable invokeListener) {
th... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\CommonMixedErrorHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static List toList() {
BusCategoryEnum[] ary = BusCategoryEnum.values();
List list = new ArrayList();
for (int i = 0; i < ary.length; i++) {
Map<String, String> map = new HashMap<String, String>();
map.put("name", ary[i].name());
map.put("desc", ary[i].getDesc());
map.put("minAmount", ary[i].ge... | * 取枚举的json字符串
*
* @return
*/
public static String getJsonStr() {
BusCategoryEnum[] enums = BusCategoryEnum.values();
StringBuffer jsonStr = new StringBuffer("[");
for (BusCategoryEnum senum : enums) {
if (!"[".equals(jsonStr.toString())) {
jsonStr.append(",");
}
jsonStr.append("{id:'").append... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\enums\BusCategoryEnum.java | 2 |
请完成以下Java代码 | public org.compiere.model.I_M_InOut getM_InOut()
{
return get_ValueAsPO(COLUMNNAME_M_InOut_ID, org.compiere.model.I_M_InOut.class);
}
@Override
public void setM_InOut(final org.compiere.model.I_M_InOut M_InOut)
{
set_ValueFromPO(COLUMNNAME_M_InOut_ID, org.compiere.model.I_M_InOut.class, M_InOut);
}
@Overri... | @Override
public int getM_InOutLine_ID()
{
return get_ValueAsInt(COLUMNNAME_M_InOutLine_ID);
}
@Override
public void setQtyDeliveredInUOM (final @Nullable BigDecimal QtyDeliveredInUOM)
{
set_Value (COLUMNNAME_QtyDeliveredInUOM, QtyDeliveredInUOM);
}
@Override
public BigDecimal getQtyDeliveredInUOM()
{... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_CallOrderDetail.java | 1 |
请完成以下Java代码 | public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
... | sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", description=").append(description);
sb.append(", adminCount=").append(adminCount);
sb.ap... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsRole.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<SizeType.AdditionalSizeInformation> getAdditionalSizeInformation() {
if (additionalSizeInformation == null) {
additionalSizeInformation = new ArrayList<SizeType.AdditionalSizeInformation>();
}
return this.additionalSizeInformation;
}
/**
* <p>Java class for... | *
* @param value
* allowed object is
* {@link String }
*
*/
public void setContent(String value) {
this.content = value;
}
/**
* Gets the value of the type property.
*
* @return
* pos... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\SizeType.java | 2 |
请完成以下Java代码 | public static Builder builderFrom(StartMessageSubscriptionImpl startMessageSubscriptionImpl) {
return new Builder(startMessageSubscriptionImpl);
}
/**
* Builder to build {@link StartMessageSubscriptionImpl}.
*/
public static final class Builder {
private String id;
privat... | }
/**
* Builder method for activityId parameter.
* @param activityId field to set
* @return builder
*/
public Builder withActivityId(String activityId) {
this.activityId = activityId;
return this;
}
/**
* Builder meth... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\StartMessageSubscriptionImpl.java | 1 |
请完成以下Java代码 | public int getAD_Workflow_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Workflow_ID);
}
@Override
public void setDateLastAlert (final java.sql.Timestamp DateLastAlert)
{
set_Value (COLUMNNAME_DateLastAlert, DateLastAlert);
}
@Override
public java.sql.Timestamp getDateLastAlert()
{
return get_ValueAsTime... | }
@Override
public boolean isProcessing()
{
return get_ValueAsBoolean(COLUMNNAME_Processing);
}
@Override
public void setRecord_ID (final int Record_ID)
{
if (Record_ID < 0)
set_Value (COLUMNNAME_Record_ID, null);
else
set_Value (COLUMNNAME_Record_ID, Record_ID);
}
@Override
public int getRe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Activity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setColumnValue(PreparedStatement sqlInsertStatement, String value) throws SQLException {
if (value == null) {
sqlInsertStatement.setNull(this.sqlIndex, this.sqlType);
} else {
switch (this.type) {
case DOUBLE:
sqlInsertStatement.set... | case ID:
default:
sqlInsertStatement.setString(this.sqlIndex, value);
break;
}
}
}
private String replaceNullChars(String strValue) {
if (strValue != null) {
return PATTERN_THREAD_LOCAL.get().matcher(strValue).repla... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\install\migrate\CassandraToSqlColumn.java | 2 |
请完成以下Java代码 | public void setProductPrice(final I_M_Product product, final BigDecimal price)
{
productId2price.put(ProductId.ofRepoId(product.getM_Product_ID()), price);
}
@Override
public boolean applies(IPricingContext pricingCtx, IPricingResult result)
{
return true;
}
@Override
public void calculate(IPricingContext... | result.setPriceStd(price);
result.setPrecision(precision);
result.setTaxCategoryId(TaxCategoryId.ofRepoId(100));
final I_C_UOM priceUOM = productId2priceUOM.get(productId);
if (priceUOM != null)
{
result.setPriceUomId(UomId.ofRepoId(priceUOM.getC_UOM_ID()));
}
result.setCalculated(true);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\MockedPricingRule.java | 1 |
请完成以下Java代码 | public class AddressInfo implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
private String firstLine;
private String secondLine;
private String zipCode;
private String state;
private String country;
@OneToOne(mappedBy = "addressI... | @JsonIgnore
private OrderInfo order;
// Bank
@OneToMany(mappedBy = "addressInfo", orphanRemoval = true, cascade = CascadeType.ALL)
@JsonIgnore
private List<BankInfo> banks;
// Customer
@ManyToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "customer_id")
@JsonIgnore
private C... | repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-5.Spring-ReactJS-Ecommerce-Shopping\fullstack\backend\model\src\main\java\com\urunov\entity\info\AddressInfo.java | 1 |
请完成以下Java代码 | public void onDeviceProfileUpdated(DeviceProfile deviceProfile, DeviceSessionContext sessionContext) {
log.debug("Handling device profile {} update event for device {}", deviceProfile.getId(), sessionContext.getDeviceId());
updateDeviceSession(sessionContext, sessionContext.getDevice(), deviceProfile);
... | .ifPresent(sessionContext -> {
log.info("SNMP session for device {} is not managed by current transport node anymore", deviceId);
destroyDeviceSession(sessionContext);
});
}
}
log.trace("Removing deleted SNMP dev... | repos\thingsboard-master\common\transport\snmp\src\main\java\org\thingsboard\server\transport\snmp\SnmpTransportContext.java | 1 |
请完成以下Java代码 | protected void openSpecific()
{
final String folder = (String)getCurrentParams().get(
IInboundProcessorBL.LOCAL_FOLDER).getValue();
final List<File> files = inboundProcessorBL.getFiles(folder);
currentFiles = files.iterator();
}
@Override
protected void closeSpecific()
{
currentFile = null;
curre... | }
if (currentFiles.hasNext())
{
currentFile = currentFiles.next();
try
{
currentStream = new FileInputStream(currentFile);
return currentStream;
}
catch (FileNotFoundException e)
{
ConfigException.throwNew(ConfigException.FILE_ACCESS_FAILED_2P,
currentFile.getAbsolutePath(), e.... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\impex\spi\impl\FileImporter.java | 1 |
请完成以下Java代码 | public void associateWithRefundCandidate(@NonNull final I_C_Invoice_Candidate invoiceCandidateRecord)
{
if (!Services.get(IInvoiceCandBL.class).isUpdateProcessInProgress())
{
return; // only the update process shall manage refund invoice candidates, to avoid locking problems and other race conditions
}
fin... | {
if (refundInvoiceCandidateService.isRefundInvoiceCandidateRecord(icRecord))
{
final RefundInvoiceCandidate refundCandidate = refundInvoiceCandidateRepository.ofRecord(icRecord);
invoiceCandidateAssignmentService.removeAllAssignments(refundCandidate);
}
else
{
final boolean readyForAnyProcessing = e... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\interceptor\C_Invoice_Candidate_Manage_Refund_Candidates.java | 1 |
请完成以下Java代码 | public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
@Override
public String getExceptionMessage() {
return exceptionMessage;
}
public void setExceptionMessage(String exceptionMessage) {
this.exceptio... | @Override
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
public String getCorrelationId() {
// v5 Jobs have no correlationId
return null;
}
} | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AbstractJobEntity.java | 1 |
请完成以下Java代码 | public int getAsyncFailedJobWaitTime() {
return asyncFailedJobWaitTime;
}
public ProcessEngineConfiguration setAsyncFailedJobWaitTime(int asyncFailedJobWaitTime) {
this.asyncFailedJobWaitTime = asyncFailedJobWaitTime;
return this;
}
public boolean isEnableProcessDefinitionInfoC... | public ProcessEngineConfiguration setCopyVariablesToLocalForTasks(boolean copyVariablesToLocalForTasks) {
this.copyVariablesToLocalForTasks = copyVariablesToLocalForTasks;
return this;
}
public boolean isCopyVariablesToLocalForTasks() {
return copyVariablesToLocalForTasks;
}
pu... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\ProcessEngineConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CaseDefinitionDecisionCollectionResource extends BaseCaseDefinitionResource {
@ApiOperation(value = "List decisions for a case definition", nickname = "listCaseDefinitionDecisions", tags = { "Case Definitions" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates the cas... | /**
* @deprecated
*/
@Deprecated
@ApiOperation(value = "List decision tables for a case definition", nickname = "listCaseDefinitionDecisionTables", tags = { "Case Definitions" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates the case definition was found and the... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\CaseDefinitionDecisionCollectionResource.java | 2 |
请完成以下Java代码 | public void setDelayForTopic(String topic, Duration delay) {
Objects.requireNonNull(topic, "Topic cannot be null");
Objects.requireNonNull(delay, "Delay cannot be null");
this.logger.debug(() -> String.format("Setting %s seconds delay for topic %s", delay, topic));
this.delaysPerTopic.pu... | @Override
public void onMessage(ConsumerRecord<K, V> data) {
onMessage(data, null, null);
}
@Override
public void onMessage(ConsumerRecord<K, V> data, Acknowledgment acknowledgment) {
onMessage(data, acknowledgment, null);
}
@Override
public void onMessage(ConsumerRecord<K,... | repos\tutorials-master\spring-kafka-3\src\main\java\com\baeldung\spring\kafka\delay\DelayedMessageListenerAdapter.java | 1 |
请完成以下Java代码 | public String toString()
{
return "MPPOrder[ID=" + get_ID()
+ "-DocumentNo=" + getDocumentNo()
+ ",IsSOTrx=" + isSOTrx()
+ ",C_DocType_ID=" + getC_DocType_ID()
+ "]";
}
/**
* Auto report the first Activity and Sub contracting if are Milestone Activity
*/
private void autoReportActivities()
{... | .durationSetup(Duration.ZERO)
.duration(Duration.ZERO)
.build());
}
}
}
private void createVariances()
{
final IPPCostCollectorBL ppCostCollectorBL = Services.get(IPPCostCollectorBL.class);
//
for (final I_PP_Order_BOMLine bomLine : getLines())
{
ppCostCollectorBL.createMaterialUsageVar... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\MPPOrder.java | 1 |
请完成以下Java代码 | public void setQtyOrdered (final @Nullable BigDecimal QtyOrdered)
{
set_Value (COLUMNNAME_QtyOrdered, QtyOrdered);
}
@Override
public BigDecimal getQtyOrdered()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyOrdered);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQty... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyReserved);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setValue (final @Nullable java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Override
public java.lang.String getValue()
{
return get_ValueAsString(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_RV_HU_Quantities_Summary.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Message {
@Id
@GeneratedValue
private Long id;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String content;
public Message(){}
public Message(String name, String content) {
this.name = name;
this.content = content;... | }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
} | repos\SpringBoot-Learning-master\1.x\Chapter3-2-4\src\main\java\com\didispace\domain\s\Message.java | 2 |
请完成以下Java代码 | private static boolean kthSmallesElementFound(int[] list1, int[] list2, int nElementsList1, int nElementsList2) {
// we do not take any element from the second list
if(nElementsList2 < 1) {
return true;
}
if(list1[nElementsList1-1] == list2[nElementsList2-1]) {
... | return combinedArray[k-1];
}
public static int getKthElementMerge(int[] list1, int[] list2, int k) {
int i1 = 0, i2 = 0;
while(i1 < list1.length && i2 < list2.length && (i1 + i2) < k) {
if(list1[i1] < list2[i2]) {
i1++;
} else {
i2++;
... | repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\kthsmallest\KthSmallest.java | 1 |
请完成以下Java代码 | private void invalidateCandidatesForInOut(final I_M_InOut inout)
{
//
// Retrieve inout line handlers
final Properties ctx = InterfaceWrapperHelper.getCtx(inout);
final List<IInvoiceCandidateHandler> inoutLineHandlers = Services.get(IInvoiceCandidateHandlerBL.class).retrieveImplementationsForTable(ctx, org.com... | @Override
public void setDeliveredData(final I_C_Invoice_Candidate ic)
{
throw new IllegalStateException("Not supported");
}
@Override
public PriceAndTax calculatePriceAndTax(final I_C_Invoice_Candidate ic)
{
throw new UnsupportedOperationException();
}
@Override
public void setBPartnerData(final I_C_Inv... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\invoicecandidate\M_InOut_Handler.java | 1 |
请完成以下Java代码 | public class MutableMoney {
@Override
public String toString() {
return "MutableMoney [amount=" + amount + ", currency=" + currency + "]";
}
public long getAmount() {
return amount;
}
public void setAmount(long amount) {
this.amount = amount;
}
public String ge... | public void setCurrency(String currency) {
this.currency = currency;
}
private long amount;
private String currency;
public MutableMoney(long amount, String currency) {
super();
this.amount = amount;
this.currency = currency;
}
} | repos\tutorials-master\google-auto-project\src\main\java\com\baeldung\autovalue\MutableMoney.java | 1 |
请完成以下Java代码 | public boolean isFinished() {
for (Pairing pairing : this) {
if (pairing.getHole() < 18) {
return false;
}
}
return true;
}
public GolfTournament at(GolfCourse golfCourse) {
Assert.notNull(golfCourse, "Golf Course must not be null");
this.golfCourse = golfCourse;
return this;
}
public G... | return this;
}
@Getter
@ToString
@EqualsAndHashCode
@RequiredArgsConstructor(staticName = "of")
public static class Pairing {
private final AtomicBoolean signedScorecard = new AtomicBoolean(false);
@NonNull
private final Golfer playerOne;
@NonNull
private final Golfer playerTwo;
public synchroniz... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\model\GolfTournament.java | 1 |
请完成以下Java代码 | public void updateRenderedAddressAndCapturedLocation(final IDocumentLocationAdapter locationAdapter)
{
toPlainDocumentLocation(locationAdapter)
.map(this::withUpdatedLocationId)
.map(this::computeRenderedAddress)
.ifPresent(locationAdapter::setRenderedAddressAndCapturedLocation);
}
@Override
public v... | toPlainDocumentLocation(locationAdapter)
.map(this::withUpdatedLocationId)
.map(this::computeRenderedAddress)
.ifPresent(locationAdapter::setRenderedAddressAndCapturedLocation);
}
@Override
public void updateRenderedAddress(final IDocumentHandOverLocationAdapter locationAdapter)
{
toPlainDocumentLoca... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\location\impl\DocumentLocationBL.java | 1 |
请完成以下Java代码 | default ConsumerRecord<K, V> receive(String topic, int partition, long offset) {
return receive(topic, partition, offset, DEFAULT_POLL_TIMEOUT);
}
/**
* Receive a single record.
* @param topic the topic.
* @param partition the partition.
* @param offset the offset.
* @param pollTimeout the timeout.
* @... | ConsumerRecords<K, V> receive(Collection<TopicPartitionOffset> requested, Duration pollTimeout);
/**
* A callback for executing arbitrary operations on the {@link Producer}.
* @param <K> the key type.
* @param <V> the value type.
* @param <T> the return type.
* @since 1.3
*/
interface ProducerCallback<K,... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\core\KafkaOperations.java | 1 |
请完成以下Java代码 | public void onMsg(TbContext ctx, TbMsg msg) {
TbEmail email = convert(msg);
TbMsg emailMsg = buildEmailMsg(ctx, msg, email);
ctx.tellNext(emailMsg, TbNodeConnectionType.SUCCESS);
}
private TbMsg buildEmailMsg(TbContext ctx, TbMsg msg, TbEmail email) {
String emailJson = JacksonU... | fromTemplate(config.getIsHtmlTemplate(), msg) : config.getMailBodyType();
builder.html(Boolean.parseBoolean(htmlStr));
builder.subject(fromTemplate(config.getSubjectTemplate(), msg));
builder.body(fromTemplate(config.getBodyTemplate(), msg));
String imagesStr = msg.getMetaData().getValue... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\mail\TbMsgToEmailNode.java | 1 |
请完成以下Java代码 | public void print(@NonNull final OutputStream bos) throws Exception
{
final I_C_Print_Job_Instructions print_Job_Instructions = printPackage.getC_Print_Job_Instructions();
final Document document = new Document();
final PdfCopy copy = new PdfCopy(document, bos);
document.open();
final PrintablePDF printab... | InterfaceWrapperHelper.save(print_Job_Instructions);
}
catch (final Exception e)
{
print_Job_Instructions.setErrorMsg(e.getLocalizedMessage());
print_Job_Instructions.setStatus(X_C_Print_Job_Instructions.STATUS_Error);
InterfaceWrapperHelper.save(print_Job_Instructions);
throw new AdempiereException(... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\PrintPackagePDFBuilder.java | 1 |
请完成以下Java代码 | protected void deleteTenantMembershipsOfTenant(String tenant) {
getDbEntityManager().delete(TenantMembershipEntity.class, "deleteTenantMembershipsOfTenant", tenant);
}
// authorizations ////////////////////////////////////////////////////////////
protected void createDefaultAuthorizations(UserEntity userEnt... | if(isAuthorizationEnabled()) {
saveDefaultAuthorizations(getResourceAuthorizationProvider().groupMembershipCreated(groupId, userId));
}
}
protected void createDefaultTenantMembershipAuthorizations(Tenant tenant, User user) {
if(isAuthorizationEnabled()) {
saveDefaultAuthorizations(getResourceAu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\db\DbIdentityServiceProvider.java | 1 |
请完成以下Java代码 | public LocalDate getDocumentDate()
{
return TimeUtil.asLocalDate(getDateDoc());
}
/**
* String Representation
*
* @return info
*/
@Override
public String toString()
{
return "MJournal["
+ get_ID() + "," + getDescription()
+ ",DR=" + getTotalDr()
+ ",CR=" + getTotalCr()
+ "]";
} //... | return m_processMsg;
} // getProcessMsg
/**
* Get Document Owner (Responsible)
*
* @return AD_User_ID (Created)
*/
@Override
public int getDoc_User_ID()
{
return getCreatedBy();
} // getDoc_User_ID
/**
* Get Document Approval Amount
*
* @return DR amount
*/
@Override
public BigDecimal... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\model\MJournal.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class StockChangedEvent implements MaterialEvent
{
public static final String TYPE = "StockChangedEvent";
EventDescriptor eventDescriptor;
ProductDescriptor productDescriptor;
WarehouseId warehouseId;
/** may be negative if a storage attribute is changed! */
BigDecimal qtyOnHand;
BigDecimal qtyOnHandOl... | Check.errorIf(stockChangeDetails == null, "stockChangeDetails may not be null; this={}", this);
Check.errorIf(stockChangeDetails.getStockId() <= 0, "stockChangeDetails.stockId may not be null; this={}", this);
}
public int getProductId()
{
return productDescriptor.getProductId();
}
@Value
public static clas... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\stock\StockChangedEvent.java | 2 |
请完成以下Java代码 | public void fireBeforeCommit(final ITrx trx)
{
// Execute the "beforeCommit". On error, propagate the exception.
fireListeners(OnError.ThrowException, TrxEventTiming.BEFORE_COMMIT, trx);
}
private TrxEventTiming getCurrentTiming()
{
return runningWithinTrxEventTiming.get();
}
@Override
public void fireAf... | }
}
private void fireListener(
@NonNull final OnError onError,
@NonNull final TrxEventTiming timingInfo,
@NonNull final ITrx trx,
@Nullable final RegisterListenerRequest listener)
{
// shouldn't be necessary but in fact i just had an NPE at this place
if (listener == null || !listener.isActive())
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\TrxListenerManager.java | 1 |
请完成以下Java代码 | public IReplRequestHandler getRequestHandlerInstance(@NonNull final I_IMP_RequestHandler requestHandlerDef)
{
Check.assume(requestHandlerDef.isActive(), "Request handler {} is active", requestHandlerDef);
final I_IMP_RequestHandlerType requestHandlerType = requestHandlerDef.getIMP_RequestHandlerType();
Check.as... | return new ReplRequestHandlerResult();
}
@Override
public I_IMP_RequestHandlerType registerHandlerType(
final String name,
final Class<? extends IReplRequestHandler> clazz,
final String entityType)
{
// TODO check if it already exists (by clazz and entityType).
// If it exists, then Util.assume that A... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\process\rpl\requesthandler\api\impl\ReplRequestHandlerBL.java | 1 |
请完成以下Java代码 | public Set<I_M_HU> getHUsForReceipts(final Collection<? extends I_M_InOut> receipts)
{
final Set<I_M_HU> hus = new TreeSet<>(HUByIdComparator.instance);
for (final I_M_InOut receipt : receipts)
{
final int inoutId = receipt.getM_InOut_ID();
final Collection<I_M_HU> husForReceipt = inoutId2hus.get(inoutId)... | {
this.receiptSchedule = receiptSchedule;
return this;
}
private I_M_ReceiptSchedule getM_ReceiptSchedule()
{
Check.assumeNotNull(receiptSchedule, "Parameter receiptSchedule is not null");
return receiptSchedule;
}
public Builder tolerateNoHUsFound()
{
tolerateNoHUsFound = true;
return t... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\ReceiptCorrectHUsProcessor.java | 1 |
请完成以下Java代码 | public static EmailAddress ofString(@NonNull final String emailAddress)
{
return new EmailAddress(emailAddress, DeactivatedOnRemotePlatform.UNKNOWN);
}
public static EmailAddress ofStringOrNull(@Nullable final String emailAddress)
{
return emailAddress != null && !Check.isBlank(emailAddress)
? ofString(ema... | {
final String valueNorm = StringUtils.trimBlankToNull(value);
if (valueNorm == null)
{
throw new AdempiereException("blank email address is not allowed");
}
this.value = valueNorm;
this.deactivatedOnRemotePlatform = deactivatedOnRemotePlatform;
}
@Override
public TYPE getType()
{
return TYPE.EMA... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\model\EmailAddress.java | 1 |
请完成以下Java代码 | public class ImageSearcher {
private MilvusServiceClient milvusClient;
public ImageSearcher() {
// 连接到Milvus
milvusClient = new MilvusServiceClient(
ConnectParam.newBuilder()
.withUri("https://in03-xxx.serverless.gcp-us-west1.cloud.zilliz.com")
.withToken("xx")
.build());
}
public void ... | List<List<Float>> vectors = Collections.singletonList(floatList);
SearchParam searchParam = SearchParam.newBuilder()
.withCollectionName("image_collection")
.withMetricType(MetricType.L2)
.withTopK(5)
.withVectors(vectors)
.withVectorFieldName("embedding")
.build();
R<SearchResults> searc... | repos\springboot-demo-master\Milvus\src\main\java\com\et\imagesearch\ImageSearcher.java | 1 |
请完成以下Java代码 | public final class JwtClaimNames {
/**
* {@code iss} - the Issuer claim identifies the principal that issued the JWT
*/
public static final String ISS = "iss";
/**
* {@code sub} - the Subject claim identifies the principal that is the subject of the
* JWT
*/
public static final String SUB = "sub";
/**... | * {@code nbf} - the Not Before claim identifies the time before which the JWT MUST
* NOT be accepted for processing
*/
public static final String NBF = "nbf";
/**
* {@code iat} - The Issued at claim identifies the time at which the JWT was issued
*/
public static final String IAT = "iat";
/**
* {@code j... | repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtClaimNames.java | 1 |
请完成以下Java代码 | public void setPort(int port) {
this.port = port;
}
public String[] getCc() {
return cc;
}
public void setCc(String[] cc) {
this.cc = cc;
}
public List<String> getBcc() {
return bcc;
}
public void setBcc(List<String> bcc) {
this.bcc = bcc;
... | public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.pass... | repos\SpringBoot-Projects-FullStack-master\Part-1 Spring Boot Basic Fund Projects\SpringBootSourceCode\SpringEmailProcess\src\main\java\spring\basic\MailProperties.java | 1 |
请完成以下Java代码 | public int getC_Async_Batch_Type_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Async_Batch_Type_ID);
}
@Override
public void setInternalName (final String InternalName)
{
set_Value (COLUMNNAME_InternalName, InternalName);
}
@Override
public String getInternalName()
{
return get_ValueAsString(COLUMNNAME_In... | * Reference name: _NotificationType
*/
public static final int NOTIFICATIONTYPE_AD_Reference_ID=540643;
/** Async Batch Processed = ABP */
public static final String NOTIFICATIONTYPE_AsyncBatchProcessed = "ABP";
/** Workpackage Processed = WPP */
public static final String NOTIFICATIONTYPE_WorkpackageProcessed =... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch_Type.java | 1 |
请完成以下Java代码 | private void validate(ReadTsKvQuery query) {
if (query == null) {
throw new IncorrectParameterException("ReadTsKvQuery can't be null");
} else if (isBlank(query.getKey())) {
throw new IncorrectParameterException("Incorrect ReadTsKvQuery. Key can't be empty");
} else if (q... | if (intervalCounts > maxTsIntervals || intervalCounts < 0) {
throw new IncorrectParameterException("Incorrect TsKvQuery. Number of intervals is to high - " + intervalCounts + ". " +
"Please increase 'interval' parameter for your query or reduce the time range of the query.");
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\timeseries\BaseTimeseriesService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + (messageNo == null ? 0 : messageNo.hashCode());
result = prime * result + (partner == null ? 0 : partner.hashCode());
result = prime * result + (qualifier == null ? 0 : qualifier.hashCode());
result = prime * result + (... | }
if (text3 == null)
{
if (other.text3 != null)
{
return false;
}
}
else if (!text3.equals(other.text3))
{
return false;
}
if (text4 == null)
{
if (other.text4 != null)
{
return false;
}
}
else if (!text4.equals(other.text4))
{
return false;
}
if (text5 == null)... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\ordersimport\compudata\H120.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Quantity getQtyToReserveParam()
{
final Quantity qtyToReserve = Quantitys.of(qty, uomId);
if (qtyToReserve.signum() <= 0)
{
throw new FillMandatoryException(PARAM_Qty);
}
return qtyToReserve;
}
private ServiceRepairProjectTask getTask()
{
return tasksCache.computeIfAbsent(getTaskId(), projec... | {
final HUsToIssueViewContext husToIssueViewContext = getHusToIssueViewContext();
return husToIssueViewContext.getTaskId();
}
private ImmutableSet<HuId> getSelectedTopLevelHUIds()
{
return streamSelectedHUIds(HUEditorRowFilter.Select.ONLY_TOPLEVEL).collect(ImmutableSet.toImmutableSet());
}
private HUsToIss... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\process\HUsToIssueView_IssueHUs.java | 2 |
请完成以下Java代码 | public String getReplacement() {
return replacement;
}
public void setReplacement(String replacement) {
this.replacement = replacement;
}
}
public static class Scrubber implements RewriteFunction<JsonNode,JsonNode> {
private final Pattern fields;... | if ( fields.matcher(f.getKey()).matches() && f.getValue().isTextual()) {
f.setValue(TextNode.valueOf(replacement));
}
else {
f.setValue(scrubRecursively(f.getValue()));
}
});
}
... | repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway-2\src\main\java\com\baeldung\springcloudgateway\customfilters\gatewayapp\filters\factories\ScrubResponseGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = "... | sb.append(", type=").append(type);
sb.append(", pic=").append(pic);
sb.append(", startTime=").append(startTime);
sb.append(", endTime=").append(endTime);
sb.append(", status=").append(status);
sb.append(", clickCount=").append(clickCount);
sb.append(", orderCount=").appen... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsHomeAdvertise.java | 1 |
请完成以下Java代码 | public Connection getConnection(final boolean autoCommit, final int transactionIsolation)
{
final AdempiereDatabase db = getDatabase(); // creates connection if not already exist
if (db == null)
{
throw new DBNoConnectionException("No AdempiereDatabase found");
}
Connection conn = null;
boolean connOk ... | return "NONE";
}
if (transactionIsolation == Connection.TRANSACTION_READ_COMMITTED)
{
return "READ_COMMITTED";
}
if (transactionIsolation == Connection.TRANSACTION_READ_UNCOMMITTED)
{
return "READ_UNCOMMITTED";
}
if (transactionIsolation == Connection.TRANSACTION_REPEATABLE_READ)
{
return "RE... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\CConnection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Replacement
{
@NonNull
Type type;
@NonNull
String value;
@NonNull
@Getter(AccessLevel.NONE)
String replacementValue;
private Replacement(
@NonNull final Type type,
@NonNull final String value,
@NonNull final String replacementValue)
{
this.type = type;
this.value = value;
this.re... | throw new RuntimeCamelException("Unknown Replacement type!");
}
@NonNull
public String getJsonPath()
{
Check.assume(this.type.equals(Type.JSON_PATH), "Type should be JSON_PATH at this stage, but instead is {}", this.type);
return replacementValue;
}
@AllArgsConstructor
@Getter
public enum Type
{
JSON_... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-leichundmehl\src\main\java\de\metas\camel\externalsystems\leichundmehl\to_leichundmehl\util\Replacement.java | 2 |
请完成以下Java代码 | public int getM_Product_ID()
{
return M_Product_ID;
}
@Override
public int getC_Charge_ID()
{
return C_Charge_ID;
}
@Override
public int getC_OrderLine_ID()
{
return C_OrderLine_ID;
}
@Override
public void setM_Product_ID(final int m_Product_ID)
{
M_Product_ID = m_Product_ID;
}
@Override
pub... | @Override
public void setPrinted(final boolean printed)
{
this.printed = printed;
}
@Override
public int getLineNo()
{
return lineNo;
}
@Override
public void setLineNo(final int lineNo)
{
this.lineNo = lineNo;
}
@Override
public void setInvoiceLineAttributes(@NonNull final List<IInvoiceLineAttribu... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceLineImpl.java | 1 |
请完成以下Java代码 | public void setAD_Session_ID (int AD_Session_ID)
{
if (AD_Session_ID < 1)
set_Value (COLUMNNAME_AD_Session_ID, null);
else
set_Value (COLUMNNAME_AD_Session_ID, Integer.valueOf(AD_Session_ID));
}
@Override
public int getAD_Session_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Session_ID);
}
@Overrid... | {
return (java.lang.String)get_Value(COLUMNNAME_HostKey);
}
@Override
public void setPassword (java.lang.String Password)
{
set_Value (COLUMNNAME_Password, Password);
}
@Override
public java.lang.String getPassword()
{
return (java.lang.String)get_Value(COLUMNNAME_Password);
}
@Override
public void... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_User_Login.java | 1 |
请完成以下Java代码 | public String getTenantId() {
return activiti5ProcessInstance.getTenantId();
}
@Override
public String getName() {
return activiti5ProcessInstance.getName();
}
@Override
public String getDescription() {
return activiti5ProcessInstance.getDescription();
}
@Overr... | @Override
public String getStartUserId() {
return null;
}
@Override
public String getCallbackId() {
return null;
}
@Override
public String getCallbackType() {
return null;
}
@Override
public String getReferenceId() {
return null;
}
... | repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5ProcessInstanceWrapper.java | 1 |
请完成以下Java代码 | public Object getCellEditorValue()
{
if (editor == null)
{
return null;
}
return editor.getValue();
}
@Override
public Component getTableCellEditorComponent(final JTable table, final Object value, final boolean isSelected, final int rowIndex, final int columnIndex)
{
final IUserQueryRestriction row =... | {
return isValueDisplayed();
}
private IUserQueryRestriction getRow(final JTable table, final int viewRowIndex)
{
final FindAdvancedSearchTableModel model = (FindAdvancedSearchTableModel)table.getModel();
final int modelRowIndex = table.convertRowIndexToModel(viewRowIndex);
return model.getRow(modelRowIndex... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindValueEditor.java | 1 |
请完成以下Java代码 | Banner print(Environment environment, @Nullable Class<?> sourceClass, PrintStream out) {
Banner banner = getBanner(environment);
banner.printBanner(environment, sourceClass, out);
return new PrintedBanner(banner, sourceClass);
}
private Banner getBanner(Environment environment) {
Banner textBanner = getTextB... | * Decorator that allows a {@link Banner} to be printed again without needing to
* specify the source class.
*/
private static class PrintedBanner implements Banner {
private final Banner banner;
private final @Nullable Class<?> sourceClass;
PrintedBanner(Banner banner, @Nullable Class<?> sourceClass) {
... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\SpringApplicationBannerPrinter.java | 1 |
请完成以下Java代码 | private POSProduct toPOSProductNoFail(@NonNull final I_M_ProductPrice productPrice)
{
try
{
return toPOSProduct(productPrice);
}
catch (Exception ex)
{
logger.warn("Failed converting {} to POSProduct. Skipped.", productPrice, ex);
return null;
}
}
private POSProduct toPOSProduct(@NonNull final ... | private ITranslatableString getProductName(final ProductId productId)
{
final I_M_Product product = getProductById(productId);
final IModelTranslationMap trls = InterfaceWrapperHelper.getModelTranslationMap(product);
return trls.getColumnTrl(I_M_Product.COLUMNNAME_Name, product.getName());
}
private UomId get... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSProductsLoader.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class StudentManagementController {
//
private static final List<Student> STUDENTS = Arrays.asList(
new Student(1, "James Bond"),
new Student(2, "Lary Gaga"),
new Student(3, "Faktor2"),
new Student(4, "Anna "),
new Student(5, "Anna German ")
... | System.out.println("registerNewStudent");
System.out.println(student);
}
@DeleteMapping(path = "{studentId}")
@PreAuthorize("hasAuthority('student:write')")
public void deleteStudent(@PathVariable() Integer studentId){
System.out.println("deleteStudent");
System.out.println(stud... | repos\SpringBoot-Projects-FullStack-master\Advanced-SpringSecure\form-based-authentication\form-based-authentication\src\main\java\uz\bepro\formbasedauthentication\controller\StudentManagementController.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.