instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public class BpartnerPriceListRestController
{
private final BpartnerPriceListServicesFacade servicesFacade;
public BpartnerPriceListRestController(
@NonNull final BpartnerPriceListServicesFacade servicesFacade)
{
this.servicesFacade = servicesFacade;
}
@GetMapping("/{bpartnerIdentifier}/sales/prices/{count... | @RequestParam(name = "date", required = false) //
@Nullable final String dateStr)
{
final IdentifierString bpartnerIdentifier = IdentifierString.of(bpartnerIdentifierStr);
return getProductPrices(bpartnerIdentifier, SOTrx.PURCHASE, countryCode, dateStr);
}
private ResponseEntity<JsonResponsePriceList> getPro... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\bpartner_pricelist\BpartnerPriceListRestController.java | 2 |
请完成以下Java代码 | public AlarmCommentId getId() {
return super.getId();
}
@Schema(description = "Timestamp of the alarm comment creation, in milliseconds", example = "1634058704567", accessMode = Schema.AccessMode.READ_ONLY)
@Override
public long getCreatedTime() {
return super.getCreatedTime();
}
... | @Override
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
@Schema(accessMode = Schema.AccessMode.READ_ONLY, description = "representing comment text", example = "Please take a look")
public String getName() {
return comment.toString();
}
public AlarmComment(AlarmComment alarmComment) ... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\alarm\AlarmComment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProtoTransportEntityService {
private final TransportService transportService;
public Device getDeviceById(DeviceId id) {
TransportProtos.GetDeviceResponseMsg deviceProto = transportService.getDevice(TransportProtos.GetDeviceRequestMsg.newBuilder()
.setDeviceIdMSB(id.getId(... | );
if (deviceCredentialsResponse.hasDeviceCredentialsData()) {
return ProtoUtils.fromProto(deviceCredentialsResponse.getDeviceCredentialsData());
} else {
throw new IllegalArgumentException("Device credentials not found");
}
}
public TransportProtos.GetSnmpDevic... | repos\thingsboard-master\common\transport\snmp\src\main\java\org\thingsboard\server\transport\snmp\service\ProtoTransportEntityService.java | 2 |
请完成以下Java代码 | private WarehouseId getDistributionNetworkWarehouseDestination(final IContext context)
{
final int attributeSetInstanceId = context.getM_AttributeSetInstance() == null
? AttributeConstants.M_AttributeSetInstance_ID_None
: context.getM_AttributeSetInstance().getM_AttributeSetInstance_ID();
final IProductPl... | final DistributionNetworkRepository distributionNetworkRepository = SpringContextHolder.instance.getBean(DistributionNetworkRepository.class);
final DistributionNetwork distributionNetwork = distributionNetworkRepository.getById(productPlanning.getDistributionNetworkId());
final List<DistributionNetworkLine> distri... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\DefaultFromOrderLineWarehouseDestProvider.java | 1 |
请完成以下Java代码 | default void putWindowContext(final String name, final boolean value)
{
Env.setContext(getCtx(), getWindowNo(), name, value);
}
default void putContext(final String name, final java.util.Date value)
{
Env.setContext(getCtx(), getWindowNo(), name, value);
}
/**
* Put to window context.
*/
default void p... | default int getGlobalContextAsInt(final String name)
{
return Env.getContextAsInt(getCtx(), name);
}
default int getTabInfoContextAsInt(final String name)
{
return Env.getContextAsInt(getCtx(), getWindowNo(), Env.TAB_INFO, name);
}
default boolean getContextAsBoolean(final String name)
{
return DisplayTy... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\callout\api\ICalloutField.java | 1 |
请完成以下Java代码 | public String[] getActivityIds() {
return activityIds;
}
public String[] getFailedActivityIds() {
return failedActivityIds;
}
public String[] getExecutionIds() {
return executionIds;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public String getProcessDefiniti... | public String[] getTenantIds() {
return tenantIds;
}
public String getHostname() {
return hostname;
}
// setter //////////////////////////////////
protected void setState(JobState state) {
this.state = state;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricJobLogQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonShipmentResponse
{
@JsonProperty("ShpCSID")
Integer shpCSID;
@JsonProperty("ShpTag")
String shpTag;
@JsonProperty("InstallationID")
String installationID;
@JsonProperty("PhysicalInstallationID")
String physicalInstallationID;
@JsonProperty("Kind")
Integer kind;
@JsonProperty("ShpNo")
... | Integer carrierConceptID;
@JsonProperty("CarrierCSID")
Integer carrierCSID;
@JsonProperty("SubcarrierConceptID")
Integer subcarrierConceptID;
@JsonProperty("SubcarrierCSID")
Integer subcarrierCSID;
@JsonProperty("ProdConceptID")
Integer prodConceptID;
@JsonProperty("ProdCSID")
Integer prodCSID;
@JsonPr... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.client.nshift\src\main\java\de\metas\shipper\client\nshift\json\response\JsonShipmentResponse.java | 2 |
请完成以下Java代码 | public class ProcessExtensionResourceFinderDescriptor implements ResourceFinderDescriptor {
private boolean checkResources;
private String locationPrefix;
private List<String> locationSuffixes;
public ProcessExtensionResourceFinderDescriptor(
boolean checkResources,
String locationPref... | return checkResources;
}
@Override
public String getMsgForEmptyResources() {
return "No process extensions were found for auto-deployment in the location '" + locationPrefix + "'";
}
@Override
public String getMsgForResourcesFound(List<String> processExtensionFiles) {
return "T... | repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\ProcessExtensionResourceFinderDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getNameSrvAddr() {
return nameSrvAddr;
}
public void setNameSrvAddr(String nameSrvAddr) {
this.nameSrvAddr = nameSrvAddr;
}
public String getTestTopic() {
return testTopic;
}
public void setTestTopic(String testTopic) {
this.testTopic = testTopic;... | public String getTestGroupId() {
return testGroupId;
}
public void setTestGroupId(String testGroupId) {
this.testGroupId = testGroupId;
}
public String getTestTag() {
return testTag;
}
public void setTestTag(String testTag) {
this.testTag = testTag;
}
} | repos\springBoot-master\springboot-rocketmq-ali\src\main\java\cn\abel\queue\config\ALiMqConfig.java | 2 |
请完成以下Java代码 | public static boolean isPangramWithStreams(String str) {
if (str == null)
return false;
// filtered character stream
String strUpper = str.toUpperCase();
Stream<Character> filteredCharStream = strUpper.chars()
.filter(item -> ((item >= 'A' && item <= 'Z')))
... | if (str == null)
return false;
// filtered character stream
String strUpper = str.toUpperCase();
Stream<Character> filteredCharStream = strUpper.chars()
.filter(item -> ((item >= 'A' && item <= 'Z')))
.mapToObj(c -> (char) c);
Map<Character, Long> alp... | repos\tutorials-master\core-java-modules\core-java-string-algorithms-5\src\main\java\com\baeldung\pangram\Pangram.java | 1 |
请完成以下Java代码 | public void setRate(Rate3 value) {
this.rate = value;
}
/**
* Gets the value of the frToDt property.
*
* @return
* possible object is
* {@link DateTimePeriodDetails }
*
*/
public DateTimePeriodDetails getFrToDt() {
return frToDt;
}
/... | }
/**
* Gets the value of the tax property.
*
* @return
* possible object is
* {@link TaxCharges2 }
*
*/
public TaxCharges2 getTax() {
return tax;
}
/**
* Sets the value of the tax property.
*
* @param value
* allowed ob... | 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\InterestRecord1.java | 1 |
请完成以下Java代码 | public class ConditionExpressionImpl extends FormalExpressionImpl implements ConditionExpression {
protected static Attribute<String> typeAttribute;
protected static Attribute<String> camundaResourceAttribute;
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder =... | super(instanceContext);
}
public String getType() {
return typeAttribute.getValue(this);
}
public void setType(String type) {
typeAttribute.setValue(this, type);
}
public String getCamundaResource() {
return camundaResourceAttribute.getValue(this);
}
public void setCamundaResource(String... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ConditionExpressionImpl.java | 1 |
请完成以下Java代码 | public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
Bar other = (Bar) obj;
return index == other.index && Objects.e... | public void setId(final long id) {
this.id = id;
}
public void setIndex(int index) {
this.index = index;
}
public void setName(final String name) {
this.name = name;
}
@Override
public String toString() {
final StringBuilder builder = new StringBuilder();
... | repos\tutorials-master\persistence-modules\spring-hibernate-6\src\main\java\com\baeldung\hibernate\cache\model\Bar.java | 1 |
请完成以下Java代码 | public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
public void setBytes(byte[] bytes) {
this.bytes = bytes;
}
@Override
public String toString() {
return "ByteArrayEntity[id=" + id + ", name=" + name + ", size=" + (bytes != null ? bytes.l... | this.name = name;
this.bytes = bytes;
}
public boolean equals(Object obj) {
if (obj instanceof PersistentState) {
PersistentState other = (PersistentState) obj;
return StringUtils.equals(this.name, other.name) && Arrays.equals(this.bytes, other.by... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ByteArrayEntityImpl.java | 1 |
请完成以下Java代码 | protected String doIt() throws Exception
{
if (p_C_Queue_Processor_ID <= 0)
{
throw new FillMandatoryException(I_C_Queue_Processor.COLUMNNAME_C_Queue_Processor_ID);
}
if (action == null)
{
throw new FillMandatoryException(PARAM_Action);
}
final I_C_Queue_Processor processorDef = InterfaceWrapperHe... | executor.removeQueueProcessor(p_C_Queue_Processor_ID);
}
else if (ACTION_RESTART.equals(action))
{
executor.removeQueueProcessor(p_C_Queue_Processor_ID);
executor.addQueueProcessor(processorDef);
}
else
{
throw new AdempiereException("@NotSupported@ @Action@: " + action);
}
return "OK";
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\process\C_Queue_Processor_Manage.java | 1 |
请完成以下Java代码 | public void addSourceHU(final @NonNull PPOrderId ppOrderId, final @NonNull HuId huId)
{
addSourceHUs(ppOrderId, ImmutableSet.of(huId));
}
@NonNull
private Map<HuId, I_PP_Order_SourceHU> retrieveRecordsIfExist(
final @NonNull PPOrderId ppOrderId,
final @NonNull Set<HuId> huIds)
{
return queryBL.createQue... | final List<HuId> huIds = queryBL.createQueryBuilder(I_PP_Order_SourceHU.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_PP_Order_SourceHU.COLUMNNAME_PP_Order_ID, ppOrderId)
.create()
.listDistinct(I_PP_Order_SourceHU.COLUMNNAME_M_HU_ID, HuId.class);
return ImmutableSet.copyOf(huIds);
}
@Non... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\source_hu\PPOrderSourceHURepository.java | 1 |
请完成以下Java代码 | public byte[] getBytes() {
return bytes;
}
public void setBytes(byte[] bytes) {
this.bytes = bytes;
}
public String getDeploymentId() {
return deploymentId;
}
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
public Object getPersistentState() {
... | return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
+ ", name=" + name
+ ", deploymentId=" + deploymentId
+ ", generated... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ResourceEntity.java | 1 |
请完成以下Java代码 | public class ExternalTaskDto {
protected String activityId;
protected String activityInstanceId;
protected String errorMessage;
protected String executionId;
protected String id;
protected Date lockExpirationTime;
private Date createTime;
protected String processDefinitionId;
protected String process... | }
public boolean isSuspended() {
return suspended;
}
public String getWorkerId() {
return workerId;
}
public String getTopicName() {
return topicName;
}
public String getTenantId() {
return tenantId;
}
public long getPriority() {
return priority;
}
public String getBusinessKe... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\externaltask\ExternalTaskDto.java | 1 |
请完成以下Java代码 | private boolean isLookupsAppendDescriptionToName()
{
return sysConfigBL.getBooleanValue(SYSCONFIG_LookupAppendDescriptionToName, true);
}
private JSONLookupValuesList toJSONLookupValuesList(final LookupValuesList lookupValuesList)
{
return JSONLookupValuesList.ofLookupValuesList(lookupValuesList, userSession.g... | }
private LookupValue completeInTrx(final DocumentId asiDocId, final JSONCompleteASIRequest request)
{
return asiRepo.forASIDocumentWritable(
asiDocId,
NullDocumentChangesCollector.instance,
documentsCollection,
asiDoc -> {
final List<JSONDocumentChangedEvent> events = request.getEvents();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pattribute\ASIRestController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ImmutableCredentials {
private final String authMethod;
private final String username;
private final String password;
@ConstructorBinding
public ImmutableCredentials(String authMethod, String username, String password) {
this.authMethod = authMethod;
this.username = us... | this.authMethod = "Default";
}
public String getAuthMethod() {
return authMethod;
}
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-core\src\main\java\com\baeldung\configurationproperties\ImmutableCredentials.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String deleteItem(@RequestBody ItemRequest request, @SessionAttribute(GeneralConstants.ID_SESSION_SHOPPING_CART) List<Product> shoppingCart) {
Optional<Product> optional = getProductById(products.stream(), request.getId());
if (optional.isPresent()) {
Product product = optional.get()... | }
/**
* Gets a product by its id from a stream
* @param stream That contains the product to get
* @param id Of the product to get
* @return The product wrapped in an Optional object
*/
private Optional<Product> getProductById(Stream<Product> stream, Long id) {
return stream
... | repos\Spring-Boot-Advanced-Projects-main\Springboot-ShoppingCard\fullstack\backend\src\main\java\com\urunov\controller\web\CartController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
/**
* Status AD_Reference_ID=541890
* Reference name: C_POS_Order_Status
*/
public static final int STATUS... | return get_ValueAsString(COLUMNNAME_Status);
}
@Override
public void setTaxAmt (final BigDecimal TaxAmt)
{
set_Value (COLUMNNAME_TaxAmt, TaxAmt);
}
@Override
public BigDecimal getTaxAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxAmt);
return bd != null ? bd : BigDecimal.ZERO;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_Order.java | 2 |
请完成以下Java代码 | public class Customer {
private int id;
private String name;
public Customer(int id, String name) {
this.id = id;
this.name = name;
}
public int getId() {
return id;
}
public String getName() {
return name;
}
@Override
public int hashCode() { | return id * 20;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof Customer) {
Customer otherCustomer = (Customer) obj;
if (id == otherCustomer.id)
return true;
}
return false;
}
} | repos\tutorials-master\core-java-modules\core-java-collections-list\src\main\java\com\baeldung\findanelement\Customer.java | 1 |
请完成以下Java代码 | public Authentication getAuthentication() {
return this.authentication;
}
public ClientRegistration getClientRegistration() {
return this.clientRegistration;
}
}
/**
* Default {@link Converter} for redirect uri resolving.
*
* @since 6.5
*/
private final class DefaultRedirectUriResolver impleme... | public Mono<String> convert(RedirectUriParameters redirectUriParameters) {
// @formatter:off
return Mono.just(redirectUriParameters.authentication)
.flatMap((authentication) -> {
URI endSessionEndpoint = endSessionEndpoint(redirectUriParameters.clientRegistration);
if (endSessionEndpoint == null) {
... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\oidc\web\server\logout\OidcClientInitiatedServerLogoutSuccessHandler.java | 1 |
请完成以下Java代码 | public void setPriorityNo (int PriorityNo)
{
set_Value (COLUMNNAME_PriorityNo, Integer.valueOf(PriorityNo));
}
/** Get Relative Priorität.
@return Where inventory should be picked from first
*/
@Override
public int getPriorityNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PriorityNo);
if (ii == n... | @Override
public java.lang.String getX1 ()
{
return (java.lang.String)get_Value(COLUMNNAME_X1);
}
/** Set Fach.
@param Y
Y-Dimension, z.B. Fach
*/
@Override
public void setY (java.lang.String Y)
{
set_Value (COLUMNNAME_Y, Y);
}
/** Get Fach.
@return Y-Dimension, z.B. Fach
*/
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Locator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void post() throws URISyntaxException {
TestDTO td = new TestDTO();
td.setId(1);
td.setName("post");
String url = HOST + POST_URL;
HttpHeaders headers = new HttpHeaders();
HttpEntity<TestDTO> httpEntity = new HttpEntity<>(td, headers);
ResponseEntity<Te... | System.out.println("exchange: " + exchange.getBody());
}
public void post4Form() {
String url = HOST + POST_PARAM_URL;
HttpHeaders headers = new HttpHeaders();
MultiValueMap<String, String> map= new LinkedMultiValueMap<>();
map.add("id", "100");
map.add("name", "post4For... | repos\spring-boot-quick-master\quick-rest-template\src\main\java\com\rest\template\service\RestService.java | 2 |
请完成以下Java代码 | private IPricingContext createPricingContext(
@NonNull final ProductId productId,
@NonNull final BPartnerId vendorId,
@NonNull final LocalDate date)
{
final CountryId countryId = bpartnersRepo.getDefaultShipToLocationCountryIdOrNull(vendorId);
final IEditablePricingContext pricingCtx = pricingBL.createPr... | }
@Override
public PurchaseProfitInfo convertToCurrency(@NonNull final PurchaseProfitInfo profitInfo, @NonNull final CurrencyId currencyIdTo)
{
return profitInfo.toBuilder()
.profitSalesPriceActual(convertToCurrency(profitInfo.getProfitSalesPriceActual(), currencyIdTo))
.profitPurchasePriceActual(convertT... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\grossprofit\PurchaseProfitInfoServiceImpl.java | 1 |
请完成以下Java代码 | public java.lang.String getProductValue ()
{
return (java.lang.String)get_Value(COLUMNNAME_ProductValue);
}
/** Set Menge.
@param Qty
Menge
*/
@Override
public void setQty (java.math.BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Menge.
@return Menge
*/
@Override
public java.... | @Override
public void setStartDate (java.sql.Timestamp StartDate)
{
set_Value (COLUMNNAME_StartDate, StartDate);
}
/** Get Anfangsdatum.
@return First effective day (inclusive)
*/
@Override
public java.sql.Timestamp getStartDate ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_StartDate);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_I_Flatrate_Term.java | 1 |
请完成以下Java代码 | public void setR_Status(org.compiere.model.I_R_Status R_Status)
{
set_ValueFromPO(COLUMNNAME_R_Status_ID, org.compiere.model.I_R_Status.class, R_Status);
}
/** Set Status.
@param R_Status_ID
Request Status
*/
@Override
public void setR_Status_ID (int R_Status_ID)
{
if (R_Status_ID < 1)
set_Value ... | }
/** Set Summary.
@param Summary
Textual summary of this request
*/
@Override
public void setSummary (java.lang.String Summary)
{
set_Value (COLUMNNAME_Summary, Summary);
}
/** Get Summary.
@return Textual summary of this request
*/
@Override
public java.lang.String getSummary ()
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Request.java | 1 |
请完成以下Java代码 | public static Optional<ProductId> optionalOfRepoId(final int repoId) {return Optional.ofNullable(ofRepoIdOrNull(repoId));}
public static Set<ProductId> ofRepoIds(final Collection<Integer> repoIds)
{
return repoIds.stream()
.filter(repoId -> repoId != null && repoId > 0)
.map(ProductId::ofRepoId)
.colle... | this.repoId = Check.assumeGreaterThanZero(repoId, "productId");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public String getAsString() {return String.valueOf(getRepoId());}
public TableRecordReference toTableRecordReference()
{
return TableRecordReference.of(I_M_Product.Table_Name,... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\product\ProductId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void newAuthor() {
Book book = new Book();
book.setIsbn("001-JN");
book.setTitle("A History of Ancient Prague");
book.setPrice(45);
Author author = new Author();
author.setName("Joana Nimar");
author.setAge(34);
author.setGenre("History");
... | Author author = authorRepository.findByName("Joana Nimar");
System.out.println(author);
}
public void byNameIsbn() {
Author author = authorRepository.findByBookIsbn("001-JN");
System.out.println(author);
}
public void byBookIsbnNativeQuery() {
Author author = ... | repos\Hibernate-SpringBoot-master\HibernateSpringBootJsonToMySQL\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | private static byte[] toByteArray(final List<String> lines)
{
try (final ByteArrayOutputStream out = new ByteArrayOutputStream())
{
lines.stream()
.map(s -> s + "\n")
.map(s -> s.getBytes(StandardCharsets.UTF_8))
.forEach(bytes -> {
try
{
out.write(bytes);
}
catch (... | }
catch (final IOException ex)
{
// shall never happen
throw AdempiereException.wrapIfNeeded(ex);
}
}
private void deleteScript(@NonNull final Path scriptPath)
{
try
{
Files.delete(scriptPath);
}
catch (final IOException ex)
{
throw new AdempiereException("Failed deleting " + scriptPath,... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\rest\MigrationScriptRestControllerTemplate.java | 1 |
请完成以下Java代码 | public void setLine (final int Line)
{
set_Value (COLUMNNAME_Line, Line);
}
@Override
public int getLine()
{
return get_ValueAsInt(COLUMNNAME_Line);
}
@Override
public void setOpenAmt (final BigDecimal OpenAmt)
{
set_ValueNoCheck (COLUMNNAME_OpenAmt, OpenAmt);
}
@Override
public BigDecimal getOpen... | /** OnCredit = P */
public static final String PAYMENTRULE_OnCredit = "P";
/** DirectDebit = D */
public static final String PAYMENTRULE_DirectDebit = "D";
/** Mixed = M */
public static final String PAYMENTRULE_Mixed = "M";
/** PayPal = L */
public static final String PAYMENTRULE_PayPal = "L";
/** PayPal Exter... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaySelectionLine.java | 1 |
请完成以下Java代码 | public PageData<DeviceProfile> findByTenantId(UUID tenantId, PageLink pageLink) {
return findDeviceProfiles(TenantId.fromUUID(tenantId), pageLink);
}
@Override
public DeviceProfileId getExternalIdByInternal(DeviceProfileId internalId) {
return Optional.ofNullable(deviceProfileRepository.get... | public List<DeviceProfileInfo> findByImageLink(String imageLink, int limit) {
return deviceProfileRepository.findByImageLink(imageLink, PageRequest.of(0, limit));
}
@Override
public PageData<DeviceProfile> findAllByTenantId(TenantId tenantId, PageLink pageLink) {
return findDeviceProfiles(t... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\device\JpaDeviceProfileDao.java | 1 |
请完成以下Java代码 | public Set<Map.Entry<String, Object>> entrySet() {
return null;
}
@Override
public Object get(Object key) {
return null;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public Set<String> keySet() {
return null;
}
@Override... | @Override
public void putAll(Map<? extends String, ? extends Object> m) {
}
@Override
public Object remove(Object key) {
return null;
}
@Override
public int size() {
return 0;
}
@Override
public Collection<Object> values() {
return null;
}
} | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\form\FormData.java | 1 |
请完成以下Java代码 | private ImmutableSet<String> getAvailableDocActions(final IValidationContext evalCtx)
{
final DocActionOptionsContext optionsCtx = DocActionOptionsContext.builder()
.userRolePermissionsKey(extractUserRolePermissionsKey(evalCtx))
.tableName(extractContextTableName(evalCtx))
.docStatus(extractDocStatus(eva... | }
private static boolean extractProcessing(final IValidationContext evalCtx)
{
final Boolean valueAsBoolean = evalCtx.get_ValueAsBoolean(WindowConstants.FIELDNAME_Processing, false);
return valueAsBoolean != null && valueAsBoolean;
}
private static String extractOrderType(final IValidationContext evalCtx)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\DocActionValidationRule.java | 1 |
请完成以下Java代码 | public void setDiscontinued(final Boolean discontinued)
{
this.discontinued = discontinued;
this.discontinuedSet = true;
}
public void setDiscontinuedFrom(final LocalDate discontinuedFrom)
{
this.discontinuedFrom = discontinuedFrom;
this.discontinuedFromSet = true;
}
public void setActive(final Boolean ... | this.syncAdvise = syncAdvise;
}
public void setBpartnerProductItems(final List<JsonRequestBPartnerProductUpsert> bpartnerProductItems)
{
this.bpartnerProductItems = bpartnerProductItems;
}
public void setProductTaxCategories(final List<JsonRequestProductTaxCategoryUpsert> productTaxCategories)
{
this.produc... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestProduct.java | 1 |
请完成以下Java代码 | public void setQtyReserved (final @Nullable BigDecimal QtyReserved)
{
set_Value (COLUMNNAME_QtyReserved, QtyReserved);
}
@Override
public BigDecimal getQtyReserved()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyReserved);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void ... | set_ValueFromPO(COLUMNNAME_User1_ID, org.compiere.model.I_C_ElementValue.class, User1);
}
@Override
public void setUser1_ID (final int User1_ID)
{
if (User1_ID < 1)
set_Value (COLUMNNAME_User1_ID, null);
else
set_Value (COLUMNNAME_User1_ID, User1_ID);
}
@Override
public int getUser1_ID()
{
retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_OrderLine.java | 1 |
请完成以下Java代码 | protected void doFilterInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {
if (StringUtils.equalsIgnoreCase("/login", httpServletRequest.getRequestURI())
&& StringUtils.equalsIgnoreCase(httpServl... | if (codeInSession == null) {
throw new ValidateCodeException("验证码不存在!");
}
if (codeInSession.isExpire()) {
sessionStrategy.removeAttribute(servletWebRequest, ValidateController.SESSION_KEY_IMAGE_CODE);
throw new ValidateCodeException("验证码已过期!");
}
if (... | repos\SpringAll-master\36.Spring-Security-ValidateCode\src\main\java\cc\mrbird\validate\code\ValidateCodeFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected static void validateJsonStructure(JsonNode expectedNode, JsonNode actualNode) {
Set<String> expectedFields = new HashSet<>();
Iterator<String> fieldsIterator = expectedNode.fieldNames();
while (fieldsIterator.hasNext()) {
expectedFields.add(fieldsIterator.next());
}... | String.format("Queue %s contains a character other than ASCII alphanumerics, '.', '_' and '-'!", fieldName));
}
}
public static boolean isValidDomain(String domainName) {
if (domainName == null) {
return false;
}
if (LOCALHOST_PATTERN.matcher(domainName).matches()) {... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\DataValidator.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Claims getAllClaimsFromToken(String token) {
return Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody();
}
private Boolean isTokenExpired(String token) {
final Date expiration = getExpirationDateFromToken(token);
return expiration.before(new Date());
}
private Boolean ignoreTokenExpi... | private String doGenerateToken(Map<String, Object> claims, String subject) {
return Jwts.builder().setClaims(claims).setSubject(subject).setIssuedAt(new Date(System.currentTimeMillis()))
.setExpiration(new Date(System.currentTimeMillis() + JWT_TOKEN_VALIDITY*1000)).signWith(SignatureAlgorithm.HS512, secret).comp... | repos\SpringBoot-Projects-FullStack-master\Advanced-SpringSecure\spring-boot-jwt-without-JPA\spring-boot-jwt\src\main\java\com\javainuse\config\JwtTokenUtil.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getIPASSCC18() {
return ipasscc18;
}
/**
* Sets the value of the ipasscc18 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIPASSCC18(String value) {
this.ipasscc18 = value;
}
/**
... | * returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the ediExpDesadvPackItem property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEDIExpDesadvPackItem().add(newItem);
* </pre>
*
*
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIExpDesadvPackType.java | 2 |
请完成以下Java代码 | public class OffsetBasedPageable implements Pageable {
private final int limit;
private final int offset;
private final Sort sort;
private OffsetBasedPageable(int limit, int offset, Sort sort) {
if (limit < 1) {
throw new IllegalArgumentException("Limit must not be less than one");
... | public Sort getSort() {
return sort;
}
@Override
public Pageable next() {
throw unsupportedOperation();
}
@Override
public Pageable previousOrFirst() {
throw unsupportedOperation();
}
@Override
public Pageable first() {
throw unsupportedOperation();... | repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\lib\OffsetBasedPageable.java | 1 |
请完成以下Java代码 | public static WFActivityStatus computeActivityState(final HUConsolidationJob ignoredJob)
{
// TODO
return WFActivityStatus.NOT_STARTED;
}
private JsonHUConsolidationJob toJson(@NonNull final HUConsolidationJob job)
{
final RenderedAddressProvider renderedAddressProvider = documentLocationBL.newRenderedAddres... | if (pickingSlotIds.isEmpty())
{
return ImmutableList.of();
}
final Set<PickingSlotIdAndCaption> pickingSlotIdAndCaptions = pickingSlotService.getPickingSlotIdAndCaptions(pickingSlotIds);
final PickingSlotQueuesSummary summary = pickingSlotService.getNotEmptyQueuesSummary(PickingSlotQueueQuery.onlyPickingSlo... | repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\workflows_api\activity_handlers\HUConsolidateWFActivityHandler.java | 1 |
请完成以下Java代码 | public void onDelete(final I_M_InOut inoutRecord)
{
try (final MDCCloseable inoutRecordMDC = TableRecordMDC.putTableRecordReference(inoutRecord))
{
if (!inoutRecord.isSOTrx())
{
return;
}
final IShipmentScheduleInvalidateBL shipmentScheduleInvalidateBL = Services.get(IShipmentScheduleInvalidateBL.... | {
if (!inoutRecord.isSOTrx())
{
return;
}
final IShipmentScheduleAllocDAO shipmentScheduleAllocDAO = Services.get(IShipmentScheduleAllocDAO.class);
shipmentScheduleAllocDAO.updateM_ShipmentSchedule_QtyPicked_ProcessedForShipment(inoutRecord);
}
}
@DocValidate(timings = ModelValidator.TIMING_AFT... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\M_InOut_Shipment.java | 1 |
请完成以下Java代码 | public IView createView(@NonNull final CreateViewRequest request)
{
final ViewId viewId = request.getViewId();
if (!PickingConstants.WINDOWID_PickingView.equals(viewId.getWindowId()))
{
throw new IllegalArgumentException("Invalid request's windowId: " + request);
}
final Set<ShipmentScheduleId> shipmentS... | Check.assumeNotEmpty(shipmentScheduleIds, "shipmentScheduleIds");
return CreateViewRequest.builder(PickingConstants.WINDOWID_PickingView)
.setFilterOnlyIds(RepoIdAwares.asRepoIds(shipmentScheduleIds))
.setParameter(VIEWPARAM_ProductBarcodeFilterData, barcodeFilterData)
.build();
}
private static Set<S... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\PackageableViewFactory.java | 1 |
请完成以下Java代码 | public boolean isAuthorized()
{
return authorizationId != null;
}
public URL getPayerApproveUrl()
{
if (payerApproveUrlString == null)
{
throw new AdempiereException("No payer url");
}
try
{
return new URL(payerApproveUrlString);
}
catch (MalformedURLException e) | {
throw AdempiereException.wrapIfNeeded(e);
}
}
public PayPalOrder withId(@NonNull final PayPalOrderId id)
{
if (Objects.equals(this.id, id))
{
return this;
}
else
{
return toBuilder().id(id).build();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\client\PayPalOrder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CurrencyId getCurrencyId()
{
return pricingInfo.getCurrencyId();
}
public OrderLineDetailCreateRequest computeOrderLineDetailCreateRequest(final ServiceRepairProjectCostCollector costCollector)
{
final Quantity qty = costCollector.getQtyReservedOrConsumed();
//
// Price & Amount precision
final M... | {
return pricingBL.calculatePrice(pricingCtx);
}
catch (final Exception ex)
{
throw AdempiereException.wrapIfNeeded(ex)
.setParameter("pricingInfo", pricingInfo)
.setParameter("pricingContext", pricingCtx)
.setParameter("costCollector", costCollector);
}
}
private IEditablePricingContext... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\commands\createQuotationFromProjectCommand\ProjectQuotationPriceCalculator.java | 2 |
请完成以下Java代码 | public void setC_Root_BPartner_ID (final int C_Root_BPartner_ID)
{
if (C_Root_BPartner_ID < 1)
set_Value (COLUMNNAME_C_Root_BPartner_ID, null);
else
set_Value (COLUMNNAME_C_Root_BPartner_ID, C_Root_BPartner_ID);
}
@Override
public int getC_Root_BPartner_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Roo... | }
@Override
public void setPharmacy_PriceList_ID (final int Pharmacy_PriceList_ID)
{
if (Pharmacy_PriceList_ID < 1)
set_Value (COLUMNNAME_Pharmacy_PriceList_ID, null);
else
set_Value (COLUMNNAME_Pharmacy_PriceList_ID, Pharmacy_PriceList_ID);
}
@Override
public int getPharmacy_PriceList_ID()
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_Alberta.java | 1 |
请完成以下Java代码 | public @NonNull InstantAndOrgId getDeliveryDate() {return packageable.getDeliveryDate();}
public @Nullable OrderId getSalesOrderId() {return packageable.getSalesOrderId();}
public @Nullable String getSalesOrderDocumentNo() {return packageable.getSalesOrderDocumentNo();}
public @Nullable OrderAndLineId getSalesOrd... | public @NonNull HUPIItemProductId getPackToHUPIItemProductId() {return packageable.getPackToHUPIItemProductId();}
public @NonNull Quantity getQtyToPick()
{
return schedule != null
? schedule.getQtyToPick()
: packageable.getQtyToPick();
}
public @Nullable UomId getCatchWeightUomId() {return packageable.g... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\ScheduledPackageable.java | 1 |
请完成以下Java代码 | protected void validateParams(String userId, String groupId, String processDefinitionId) {
if (processDefinitionId == null) {
throw new FlowableIllegalArgumentException("processDefinitionId is null");
}
if (userId == null && groupId == null) {
throw new FlowableIllegalAr... | if (Flowable5Util.isFlowable5ProcessDefinition(processDefinition, commandContext)) {
Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();
compatibilityHandler.addCandidateStarter(processDefinitionId, userId, groupId);
return null;
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\AddIdentityLinkForProcessDefinitionCmd.java | 1 |
请完成以下Java代码 | public Double getCollectResultValue() {
return collectResultValue;
}
public void setCollectResultValue(Double collectResultValue) {
this.collectResultValue = collectResultValue;
}
public String getRootDecisionInstanceId() {
return rootDecisionInstanceId;
}
public void setRootDecisionInstanceI... | public String getDecisionRequirementsDefinitionId() {
return decisionRequirementsDefinitionId;
}
public void setDecisionRequirementsDefinitionId(String decisionRequirementsDefinitionId) {
this.decisionRequirementsDefinitionId = decisionRequirementsDefinitionId;
}
public String getDecisionRequirementsD... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDecisionInstanceEntity.java | 1 |
请完成以下Java代码 | public class BatchSeedJobHandler implements JobHandler<BatchSeedJobConfiguration> {
public static final String TYPE = "batch-seed-job";
public String getType() {
return TYPE;
}
public void execute(BatchSeedJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String te... | return new BatchSeedJobConfiguration(canonicalString);
}
public static class BatchSeedJobConfiguration implements JobHandlerConfiguration {
protected String batchId;
public BatchSeedJobConfiguration(String batchId) {
this.batchId = batchId;
}
public String getBatchId() {
return batchI... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchSeedJobHandler.java | 1 |
请完成以下Java代码 | public class WaitingState implements Runnable {
public static Thread t1;
public static void main(String[] args) {
t1 = new Thread(new WaitingState());
t1.start();
}
public void run() {
Thread t2 = new Thread(new DemoWaitingStateRunnable());
t2.start();
try {
... | }
}
class DemoWaitingStateRunnable implements Runnable {
public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
e.printStackTrace();
}
System.out.println(WaitingState.t1.getSta... | repos\tutorials-master\core-java-modules\core-java-concurrency-simple\src\main\java\com\baeldung\concurrent\threadlifecycle\WaitingState.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DeploymentResourceResponse {
private String id;
private String url;
private String contentUrl;
private String mediaType;
private String type;
public DeploymentResourceResponse(String resourceId, String url, String contentUrl, String mediaType, String type) {
setId(resourceI... | this.contentUrl = contentUrl;
}
@ApiModelProperty(example = "http://localhost:8081/flowable-rest/service/cmmn-repository/deployments/10/resourcedata/diagrams%2Fmy-process.bpmn20.xml")
public String getContentUrl() {
return contentUrl;
}
public void setMediaType(String mimeType) {
t... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\DeploymentResourceResponse.java | 2 |
请完成以下Java代码 | public static String getUsername(String token) {
try {
DecodedJWT jwt = JWT.decode(token);
return jwt.getClaim("username").asString();
} catch (JWTDecodeException e) {
log.error("error:{}", e.getMessage());
return null;
}
}
/**
* 生成 t... | */
public static String sign(String username, String secret) {
try {
username = StringUtils.lowerCase(username);
Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
Algorithm algorithm = Algorithm.HMAC256(secret);
return JWT.create()
... | repos\SpringAll-master\62.Spring-Boot-Shiro-JWT\src\main\java\com\example\demo\authentication\JWTUtil.java | 1 |
请完成以下Java代码 | public static String getErrorMsg(Throwable e)
{
// save the exception for displaying to user
String msg = e.getLocalizedMessage();
if (Check.isEmpty(msg, true))
{
msg = e.getMessage();
}
if (Check.isEmpty(msg, true))
{
// note that e.g. a NullPointerException doesn't have a nice message
msg = du... | if (!Character.isDigit(currentChar))
{
stringWithZeros.append('0');
}
else
{
stringWithZeros.append(currentChar);
}
}
return stringWithZeros.toString();
}
public static int getMinimumOfThree(final int no1, final int no2, final int no3)
{
return no1 < no2 ? (no1 < no3 ? no1 : no3) : (no... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Util.java | 1 |
请完成以下Java代码 | public Movie movieByImdbId(@QueryParam("imdbId") String imdbId) {
System.out.println("*** Calling getinfo for a given ImdbID***");
if (inventory.containsKey(imdbId)) {
return inventory.get(imdbId);
} else
return null;
}
@POST
@Path("/addmovie")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLI... | }
@DELETE
@Path("/deletemovie")
public Response deleteMovie(@QueryParam("imdbId") String imdbId) {
System.out.println("*** Calling deleteMovie ***");
if (null == inventory.get(imdbId)) {
return Response.status(Response.Status.NOT_FOUND).entity("Movie is not in the database.\nUnable to Delete")
.build... | repos\tutorials-master\web-modules\resteasy\src\main\java\com\baeldung\server\MovieCrudService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void executeDelete(CommandContext commandContext) {
batchServiceConfiguration.getBatchEntityManager().deleteBatches(this);
}
@Override
@Deprecated
public void deleteWithRelatedData() {
delete();
}
// getters //////////////////////////////////////////
@Overrid... | public String getSearchKey2() {
return searchKey2;
}
public Date getCreateTimeHigherThan() {
return createTimeHigherThan;
}
public Date getCreateTimeLowerThan() {
return createTimeLowerThan;
}
public String getStatus() {
return status;
}
public String ... | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\BatchQueryImpl.java | 2 |
请完成以下Java代码 | public ListenerFactory getListenerFactory() {
return listenerFactory;
}
public void setListenerFactory(ListenerFactory listenerFactory) {
this.listenerFactory = listenerFactory;
}
public BpmnParseFactory getBpmnParseFactory() {
return bpmnParseFactory;
}
public void se... | return expressionManager;
}
public void setExpressionManager(ExpressionManager expressionManager) {
this.expressionManager = expressionManager;
}
public BpmnParseHandlers getBpmnParserHandlers() {
return bpmnParserHandlers;
}
public void setBpmnParserHandlers(BpmnParseHandlers... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\BpmnParser.java | 1 |
请完成以下Java代码 | public class EnvironmentEndpointWebExtension {
private final EnvironmentEndpoint delegate;
private final Show showValues;
private final Set<String> roles;
public EnvironmentEndpointWebExtension(EnvironmentEndpoint delegate, Show showValues, Set<String> roles) {
this.delegate = delegate;
this.showValues = sh... | public EnvironmentDescriptor environment(SecurityContext securityContext, @Nullable String pattern) {
boolean showUnsanitized = this.showValues.isShown(securityContext, this.roles);
return this.delegate.getEnvironmentDescriptor(pattern, showUnsanitized);
}
@ReadOperation
public WebEndpointResponse<EnvironmentEn... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\env\EnvironmentEndpointWebExtension.java | 1 |
请完成以下Java代码 | public LocalDate getDocumentDate(@NonNull final DocumentTableFields docFields)
{
final I_M_Shipment_Declaration shipmentDeclaration = extractShipmentDeclaration(docFields);
return TimeUtil.asLocalDate(shipmentDeclaration.getDeliveryDate());
}
@Override
public int getDoc_User_ID(DocumentTableFields docFields)
... | @Override
public void reactivateIt(DocumentTableFields docFields)
{
final I_M_Shipment_Declaration shipmentDeclaration = extractShipmentDeclaration(docFields);
shipmentDeclaration.setProcessed(false);
shipmentDeclaration.setDocAction(IDocument.ACTION_Complete);
}
private static I_M_Shipment_Declaration ext... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipment\document\ShipmentDeclarationDocumentHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable Boolean getAllowCredentials() {
return this.allowCredentials;
}
public void setAllowCredentials(@Nullable Boolean allowCredentials) {
this.allowCredentials = allowCredentials;
}
public Duration getMaxAge() {
return this.maxAge;
}
public void setMaxAge(Duration maxAge) {
this.maxAge = m... | public @Nullable CorsConfiguration toCorsConfiguration() {
if (CollectionUtils.isEmpty(this.allowedOrigins) && CollectionUtils.isEmpty(this.allowedOriginPatterns)) {
return null;
}
PropertyMapper map = PropertyMapper.get();
CorsConfiguration configuration = new CorsConfiguration();
map.from(this::getAllowe... | repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\endpoint\web\CorsEndpointProperties.java | 2 |
请完成以下Java代码 | public String getLastName() {
return lastName;
}
public String getFirstName() {
return firstName;
}
public long getId() {
return id;
}
public void setLastName(final String lastName) {
this.lastName = lastName;
}
public void setFirstName(final String fi... | if (!Objects.equals(lastName, employee.lastName)) {
return false;
}
return Objects.equals(firstName, employee.firstName);
}
@Override
public int hashCode() {
int result = lastName != null ? lastName.hashCode() : 0;
result = 31 * result + (firstName != null ? firs... | repos\tutorials-master\spring-boot-modules\spring-boot-data-2\src\main\java\com\baeldung\jsonignore\nullfields\Employee.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public String getEmail() {
return email;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Person [age=");
builder.append(age);
builder.append(", name=");
... | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Person other = (Person) obj;
if (email == null) {
if (other.email != null... | repos\tutorials-master\libraries-3\src\main\java\com\baeldung\nullaway\Person.java | 1 |
请完成以下Java代码 | private JSONDashboardItem changeDashboardItem(
final DashboardWidgetType widgetType,
final UserDashboardItemId itemId,
final List<JSONPatchEvent<DashboardItemPatchPath>> events)
{
userSession.assertLoggedIn();
//
// Change the dashboard item
final UserDashboardItemChangeRequest request = UserDashboar... | websocketSender.sendDashboardItemChangedEvent(dashboard, changeResult);
// Return the changed item
{
final UserDashboardItem item = dashboard.getItemById(widgetType, itemId);
final UserDashboardItemDataResponse data = dashboardDataService.getData(dashboard.getId())
.getItemData(UserDashboardItemDataRequ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\DashboardRestController.java | 1 |
请完成以下Java代码 | public Collection<ProcessClassParamInfo> getParameterInfos()
{
return parameterInfos.values();
}
public List<ProcessClassParamInfo> getParameterInfos(final String parameterName, final boolean parameterTo)
{
return parameterInfos.get(ProcessClassParamInfo.createParameterUniqueKey(parameterName, parameterTo));
... | {
// No profiles restriction => allowed
if (onlyForProfiles == null || onlyForProfiles.length == 0)
{
return true;
}
// No application context => allowed (but warn)
final ApplicationContext context = SpringContextHolder.instance.getApplicationContext();
if (context == null)
{
logger.warn("No appl... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessClassInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static BackOff getBackOff(Backoff retryTopicBackoff) {
PropertyMapper map = PropertyMapper.get();
RetryPolicy.Builder builder = RetryPolicy.builder().maxRetries(Long.MAX_VALUE);
map.from(retryTopicBackoff.getDelay()).to(builder::delay);
map.from(retryTopicBackoff.getMaxDelay()).when(Predicate.not(Duration::isZe... | if (StringUtils.hasLength(securityProtocol)) {
properties.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol);
}
}
static class KafkaRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
hints.reflecti... | repos\spring-boot-4.0.1\module\spring-boot-kafka\src\main\java\org\springframework\boot\kafka\autoconfigure\KafkaAutoConfiguration.java | 2 |
请完成以下Java代码 | public class Product {
private String name;
private double price;
private int id;
public Product(String name, double price, int id) {
super();
this.name = name;
this.price = price;
this.id = id;
}
public String getName() {
return name;
}
public ... | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Product other = (Product) obj;
if (id != other.id)
return false;
... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc-2\src\main\java\com\baeldung\springbootmvc\model\Product.java | 1 |
请完成以下Java代码 | public void setValueMax (java.lang.String ValueMax)
{
set_Value (COLUMNNAME_ValueMax, ValueMax);
}
/** Get Max. Wert.
@return Maximum Value for a field
*/
@Override
public java.lang.String getValueMax ()
{
return (java.lang.String)get_Value(COLUMNNAME_ValueMax);
}
/** Set Min. Wert.
@param ValueMi... | return (java.lang.String)get_Value(COLUMNNAME_ValueMin);
}
/** Set Value Format.
@param VFormat
Format of the value; Can contain fixed format elements, Variables: "_lLoOaAcCa09"
*/
@Override
public void setVFormat (java.lang.String VFormat)
{
set_Value (COLUMNNAME_VFormat, VFormat);
}
/** Get Value F... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process_Para.java | 1 |
请完成以下Java代码 | public Optional<Quantity> getQtyPicked()
{
return Optional.ofNullable(pickedTo != null ? pickedTo.getQtyPicked() : null);
}
public Optional<Quantity> getQtyRejected()
{
if (pickedTo == null)
{
return Optional.empty();
}
final QtyRejectedWithReason qtyRejected = pickedTo.getQtyRejected();
if (qtyRej... | {
throw new AdempiereException("PickFrom was not picked: " + this);
}
}
public PickingJobStepPickFrom assertNotPicked()
{
if (isPicked())
{
throw new AdempiereException("PickFrom already picked: " + this);
}
return this;
}
public PickingJobStepPickFrom withPickedEvent(@NonNull final PickingJobSt... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobStepPickFrom.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Use getUse() {
return this.use;
}
public static class Use {
/**
* Use the HTTP header with the given name to obtain the version.
*/
private @Nullable String header;
/**
* Use the query parameter with the given name to obtain the version.
*/
private @Nullable String queryPara... | public void setQueryParameter(@Nullable String queryParameter) {
this.queryParameter = queryParameter;
}
public @Nullable Integer getPathSegment() {
return this.pathSegment;
}
public void setPathSegment(@Nullable Integer pathSegment) {
this.pathSegment = pathSegment;
}
public Map<MediaT... | repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\autoconfigure\WebFluxProperties.java | 2 |
请完成以下Java代码 | public int getLeichMehl_PluFile_ConfigGroup_ID()
{
return get_ValueAsInt(COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID);
}
@Override
public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Produ... | {
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setPLU_File (final String PLU_File)
{
set_Value (COLUMNNAME_PLU_File, PLU_File);
}
@Override
public String getPLU_File()
{
return get_ValueAsString(COLUMNNAME_PLU_File);
}
} | 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代码 | private boolean isFieldEditable(final String fieldName)
{
final ViewEditorRenderMode renderMode = getViewEditorRenderModeByFieldName().get(fieldName);
return renderMode != null && renderMode.isEditable();
}
@Override
public DocumentId getId()
{
return id;
}
@Override
public boolean isProcessed()
{
re... | {
return toBuilder().lastShipmentDays(lastShipmentDays).build();
}
}
public boolean isChanged()
{
return getProductPriceId() == null
|| !getPrice().isPriceListPriceUsed();
}
public boolean isMatching(@NonNull final ProductsProposalViewFilter filter)
{
return Check.isEmpty(filter.getProductName())
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\model\ProductsProposalRow.java | 1 |
请完成以下Java代码 | public Object getValue()
{
if (m_value == null)
return null;
return new Integer(m_value.getC_Location_ID());
} // getValue
/**
* Return Editor value
* @return value
*/
public int getC_Location_ID()
{
if (m_value == null)
return 0;
return m_value.getC_Location_ID();
} // getC_Location_ID
/*... | public synchronized void addMouseListener(MouseListener l)
{
m_text.addMouseListener(l);
}
/**
* Set Field/WindowNo for ValuePreference (NOP)
* @param mField Model Field
*/
@Override
public void setField (org.compiere.model.GridField mField)
{
m_GridField = mField;
EditorContextPopupMenu.onGridFie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VLocation.java | 1 |
请完成以下Java代码 | public class NotificationsSubscription extends AbstractNotificationSubscription<NotificationsSubscriptionUpdate> {
private final Map<UUID, Notification> latestUnreadNotifications = new HashMap<>();
private final int limit;
private final Set<NotificationType> notificationTypes;
@Builder
public Noti... | public UnreadNotificationsUpdate createPartialUpdate(Notification notification) {
return UnreadNotificationsUpdate.builder()
.cmdId(getSubscriptionId())
.update(notification)
.totalUnreadCount(totalUnreadCounter.get())
.sequenceNumber(sequence.incr... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\ws\notification\sub\NotificationsSubscription.java | 1 |
请完成以下Java代码 | public void execute(DelegateExecution execution) {
ThrowEvent throwEvent = (ThrowEvent) execution.getCurrentFlowElement();
/*
* From the BPMN 2.0 spec:
*
* The Activity to be compensated MAY be supplied.
*
* If an Activity is not supplied, then the compensat... | eventSubscriptionEntityManager.findCompensateEventSubscriptionsByProcessInstanceIdAndActivityId(
execution.getProcessInstanceId(),
flowElement.getId()
)
);
}
}
}
if (eventSubs... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\IntermediateThrowCompensationEventActivityBehavior.java | 1 |
请完成以下Java代码 | public static DmnDefinition getDmnDefinitionByDecisionId(String decisionId) {
DeploymentManager deploymentManager = CommandContextUtil.getDmnEngineConfiguration().getDeploymentManager();
// This will check the cache in the findDeployedDecisionById and resolveDecisionTable method
DecisionEntity ... | return decisionTable;
}
public static DecisionService getDecisionService(String decisionId) {
DmnDefinition dmnDefinition = getDmnDefinitionByDecisionId(decisionId);
DecisionService decisionService = dmnDefinition.getDecisionServiceById(decisionId);
if (decisionService == null) {
... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\util\DecisionUtil.java | 1 |
请完成以下Java代码 | private boolean isMultiValue(Class<?> returnType, @Nullable ReactiveAdapter adapter) {
if (Flux.class.isAssignableFrom(returnType)) {
return true;
}
return adapter == null || adapter.isMultiValue();
}
private Mono<?> filterSingleValue(Publisher<?> filterTarget, Expression filterExpression, EvaluationContext... | @Override
public boolean isPerInstance() {
return true;
}
@Override
public int getOrder() {
return this.order;
}
public void setOrder(int order) {
this.order = order;
}
private static final class FilterTarget {
private final Publisher<?> value;
private final int index;
private FilterTarget(Pub... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\PreFilterAuthorizationReactiveMethodInterceptor.java | 1 |
请完成以下Java代码 | private void createFactsForMovementLine(final Fact fact, final DocLine_Movement line)
{
final AcctSchema as = fact.getAcctSchema();
final MoveCostsResult costs = line.getCreateCosts(as);
//
// Inventory CR/DR (from locator)
final CostAmount outboundCosts = costs.getOutboundAmountToPost(as);
fact.createLi... | .buildAndAdd();
//
// InventoryTo DR/CR (to locator)
final CostAmount inboundCosts = costs.getInboundAmountToPost(as);
fact.createLine()
.setDocLine(line)
.setAccount(line.getAccount(ProductAcctType.P_Asset_Acct, as))
.setAmtSourceDrOrCr(inboundCosts.toMoney()) // to (+) DR
.setQty(line.getQty(... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_Movement.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRole() {
return role;
}
public void setRol... | this.role = role;
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
... | repos\tutorials-master\persistence-modules\hibernate-jpa-3\src\main\java\com\baeldung\hibernate\union\dto\PersonDto.java | 1 |
请完成以下Java代码 | public Iterator<T> iterator() {
return new IteratorDecorator<>(this.source.iterator(), this.transform, this.filter);
}
}
public static class IteratorDecorator<U, T> implements Iterator<T> {
private final Iterator<U> source;
private final Function<U, T> transform;
pr... | U val = source.next();
if (filter.test(val)) {
next = transform.apply(val);
}
}
}
}
public void remove() {
throw new UnsupportedOperationException();
}
}
} | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\util\Iterables.java | 1 |
请完成以下Java代码 | public EventResourceEntity getEntity() {
ensureInitialized();
return entity;
}
public void delete() {
if (!deleted && id != null) {
if (entity != null) {
// if the entity has been loaded already,
// we might as well use the safer optimistic lo... | }
private void ensureInitialized() {
if (id != null && entity == null) {
entity = CommandContextUtil.getResourceEntityManager().findById(id);
name = entity.getName();
}
}
public boolean isDeleted() {
return deleted;
}
@Override
public String toS... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\ResourceRef.java | 1 |
请完成以下Java代码 | public Collection<CaseFileItem> getTargetRefs() {
return targetRefCollection.getReferenceTargetElements(this);
}
public Children getChildren() {
return childrenChild.getChild(this);
}
public void setChildren(Children children) {
childrenChild.setChild(this, children);
}
public static void reg... | .build();
sourceRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REFS)
.idAttributeReferenceCollection(CaseFileItem.class, CmmnAttributeElementReferenceCollection.class)
.build();
targetRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_TARGET_REFS)
.idAttribut... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseFileItemImpl.java | 1 |
请完成以下Java代码 | public void setExceptionMessage(String exceptionMessage) {
this.exceptionMessage = exceptionMessage;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((dueDate == null) ? 0 : dueDate.hashCode());
result = prime * res... | } else if (!endDate.equals(other.endDate)) return false;
if (exceptionMessage == null) {
if (other.exceptionMessage != null) return false;
} else if (!exceptionMessage.equals(other.exceptionMessage)) return false;
if (id == null) {
if (other.id != null) return false;
... | repos\Activiti-develop\activiti-api\activiti-api-process-model\src\main\java\org\activiti\api\process\model\payloads\TimerPayload.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String login(HttpServletRequest req, UserCredentials cred, RedirectAttributes attr) {
if(req.getMethod().equals(RequestMethod.GET.toString())) {
return "login";
} else {
Subject subject = SecurityUtils.getSubject();
if(!subject.isAuthenticated()) {
UsernamePassword... | role = role + "You are an Author";
}
if(currentUser.isPermitted("articles:compose")) {
permission = permission + "You can compose an article, ";
} else {
permission = permission + "You are not permitted to compose an article!, ";
}
if(currentUser.isPermi... | repos\tutorials-master\security-modules\apache-shiro\src\main\java\com\baeldung\intro\controllers\ShiroSpringController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<TimerJobEntity> execute(CommandContext commandContext) {
JobServiceConfiguration jobServiceConfiguration = asyncExecutor.getJobServiceConfiguration();
List<String> enabledCategories = jobServiceConfiguration.getEnabledJobCategories();
List<TimerJobEntity> timerJobs = jobServiceConfig... | // try to lock, as the revision will not match.
GregorianCalendar jobExpirationTime = calculateLockExpirationTime(lockTimeInMillis, jobServiceConfiguration);
job.setLockOwner(asyncExecutor.getLockOwner());
job.setLockExpirationTime(jobExpirationTime.getTime());
}
protected GregorianCal... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\AcquireTimerJobsCmd.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceRecipientExtensionType {
@XmlElement(name = "InvoiceRecipientExtension", namespace = "http://erpel.at/schemas/1p0/documents/extensions/edifact")
protected at.erpel.schemas._1p0.documents.extensions.edifact.InvoiceRecipientExtensionType invoiceRecipientExtension;
@XmlElement(name = "Erpe... | this.invoiceRecipientExtension = value;
}
/**
* Gets the value of the erpelInvoiceRecipientExtension property.
*
* @return
* possible object is
* {@link CustomType }
*
*/
public CustomType getErpelInvoiceRecipientExtension() {
return erpelInvoiceReci... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\InvoiceRecipientExtensionType.java | 2 |
请完成以下Java代码 | public int getM_Product_ID()
{
return ProductId.toRepoId(getProductId());
}
@Override
@Deprecated
public void setM_Product_ID(final int productId)
{
setProductId(ProductId.ofRepoIdOrNull(productId));
}
@Override
@Deprecated
public int getC_UOM_ID()
{
return UomId.toRepoId(getUomId());
}
@Override
... | @Override
@Deprecated
public void setM_AttributeSetInstance_ID(final int M_AttributeSetInstance_ID)
{
setAsiId(AttributeSetInstanceId.ofRepoIdOrNull(M_AttributeSetInstance_ID));
}
@Override
@Deprecated
public int getC_BPartner_ID()
{
return BPartnerId.toRepoId(getBpartnerId());
}
@Override
@Deprecated
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\PlainHUPackingAware.java | 1 |
请完成以下Java代码 | public int getIncrementNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_IncrementNo);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Lot Control.
@param M_LotCtl_ID
Product Lot Control
*/
public void setM_LotCtl_ID (int M_LotCtl_ID)
{
if (M_LotCtl_ID < 1)
set_ValueNoCheck (CO... | Prefix before the sequence number
*/
public void setPrefix (String Prefix)
{
set_Value (COLUMNNAME_Prefix, Prefix);
}
/** Get Prefix.
@return Prefix before the sequence number
*/
public String getPrefix ()
{
return (String)get_Value(COLUMNNAME_Prefix);
}
/** Set Start No.
@param StartNo
Star... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_LotCtl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Map<TopicPartition, Long> getProducerOffsets(Map<TopicPartition, Long> consumerGrpOffset) {
List<TopicPartition> topicPartitions = new LinkedList<>();
for (Map.Entry<TopicPartition, Long> entry : consumerGrpOffset.entrySet()) {
TopicPartition key = entry.getKey();
topicPa... | }
private KafkaConsumer<String, String> getKafkaConsumer(
String bootstrapServerConfig) {
Properties properties = new Properties();
properties.setProperty(
ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG,
bootstrapServerConfig);
properties.setProperty(
ConsumerCo... | repos\tutorials-master\spring-kafka-2\src\main\java\com\baeldung\spring\kafka\monitoring\service\LagAnalyzerService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getBucketName() {
return this.bucketName;
}
public void setBucketName(@Nullable String bucketName) {
this.bucketName = bucketName;
}
public @Nullable String getScopeName() {
return this.scopeName;
}
public void setScopeName(@Nullable String scopeName) {
this.scopeName = scopeNam... | }
public void setFieldNamingStrategy(@Nullable Class<?> fieldNamingStrategy) {
this.fieldNamingStrategy = fieldNamingStrategy;
}
public String getTypeKey() {
return this.typeKey;
}
public void setTypeKey(String typeKey) {
this.typeKey = typeKey;
}
} | repos\spring-boot-4.0.1\module\spring-boot-data-couchbase\src\main\java\org\springframework\boot\data\couchbase\autoconfigure\DataCouchbaseProperties.java | 2 |
请完成以下Java代码 | public void setAuthorityMapper(Function<Map<String, List<String>>, GrantedAuthority> authorityMapper) {
Assert.notNull(authorityMapper, "authorityMapper must not be null");
this.authorityMapper = authorityMapper;
}
/**
* Returns the current LDAP template. Method available so that classes extending this
* can... | * Returns the role prefix used by this populator Method available so that classes
* extending this can override
* @return the role prefix
* @see #setRolePrefix(String)
*/
protected final String getRolePrefix() {
return this.rolePrefix;
}
/**
* Returns true if role names are converted to uppercase Method... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\userdetails\DefaultLdapAuthoritiesPopulator.java | 1 |
请完成以下Java代码 | public PlainCardData1 getPlainCardData() {
return plainCardData;
}
/**
* Sets the value of the plainCardData property.
*
* @param value
* allowed object is
* {@link PlainCardData1 }
*
*/
public void setPlainCardData(PlainCardData1 value) {
th... | /**
* Sets the value of the cardBrnd property.
*
* @param value
* allowed object is
* {@link GenericIdentification1 }
*
*/
public void setCardBrnd(GenericIdentification1 value) {
this.cardBrnd = value;
}
/**
* Gets the value of the addtlCardData... | 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\PaymentCard4.java | 1 |
请完成以下Java代码 | public void setM_FreightCostShipper_ID (int M_FreightCostShipper_ID)
{
if (M_FreightCostShipper_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_FreightCostShipper_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_FreightCostShipper_ID, Integer.valueOf(M_FreightCostShipper_ID));
}
/** Get Lieferweg-Versandkosten.
... | else
set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID));
}
/** Get Lieferweg.
@return Methode oder Art der Warenlieferung
*/
public int getM_Shipper_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Gue... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\model\X_M_FreightCostShipper.java | 1 |
请完成以下Java代码 | public class LifecycleEvent extends Event {
private static final long serialVersionUID = -3247420461850911549L;
@Builder
private LifecycleEvent(TenantId tenantId, UUID entityId, String serviceId,
UUID id, long ts,
String lcEventType, boolean success, S... | }
@Override
public EventInfo toInfo(EntityType entityType) {
EventInfo eventInfo = super.toInfo(entityType);
var json = (ObjectNode) eventInfo.getBody();
json.put("event", lcEventType)
.put("success", success);
if (error != null) {
json.put("error", e... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\event\LifecycleEvent.java | 1 |
请完成以下Java代码 | public class JmxConnectionWrapper {
private final Map<String, MBeanAttributeInfo> attributeMap;
private final MBeanServerConnection connection;
private final ObjectName objectName;
public JmxConnectionWrapper(String url, String beanName) throws Exception {
objectName = new ObjectName(beanName)... | String[] signature = new String[] {};
Object[] params = new Object[] {};
return connection.invoke(objectName, operation, params, signature);
}
private static Object parse(String value) {
if (value == null)
return null;
if (value.matches("\\d+")) {
retur... | repos\tutorials-master\core-java-modules\core-java-perf-2\src\main\java\com\baeldung\jmxshell\custom\JmxConnectionWrapper.java | 1 |
请完成以下Java代码 | public MessagePostProcessor removeDecompressor(String contentEncoding) {
return this.decompressors.remove(contentEncoding);
}
/**
* Replace all the decompressors.
* @param decompressors the decompressors.
*/
public void setDecompressors(Map<String, MessagePostProcessor> decompressors) {
this.decompressors... | int delimAt = encoding.indexOf(':');
if (delimAt < 0) {
delimAt = encoding.indexOf(',');
}
if (delimAt > 0) {
encoding = encoding.substring(0, delimAt);
}
MessagePostProcessor decompressor = this.decompressors.get(encoding);
if (decompressor != null) {
return decompressor.postProcessMessage(message... | repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\support\postprocessor\DelegatingDecompressingPostProcessor.java | 1 |
请完成以下Java代码 | public class X_AD_WF_Node_Template extends org.compiere.model.PO implements I_AD_WF_Node_Template, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -1982377865L;
/** Standard Constructor */
public X_AD_WF_Node_Template (final Properties ctx, final int AD_WF_Node_Template_ID, @N... | @Override
public int getAD_WF_Node_Template_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_WF_Node_Template_ID);
}
@Override
public void setDescription (final java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
@Override
public java.lang.String getDescription()
{
return ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Node_Template.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private MapConfig initializeDefaultMapConfig(JHipsterProperties jHipsterProperties) {
MapConfig mapConfig = new MapConfig("default");
/*
Number of backups. If 1 is set as the backup-count for example,
then all entries of the map will be copied to another JVM for
fail-safety. Val... | mapConfig.setTimeToLiveSeconds(jHipsterProperties.getCache().getHazelcast().getTimeToLiveSeconds());
return mapConfig;
}
@Autowired(required = false)
public void setGitProperties(GitProperties gitProperties) {
this.gitProperties = gitProperties;
}
@Autowired(required = false)
p... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\car-app\src\main\java\com\cars\app\config\CacheConfiguration.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.