instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public List<TopicSubscription> getSubscriptions() {
return subscriptions;
}
public boolean isRunning() {
return isRunning.get();
}
public void setBackoffStrategy(BackoffStrategy backOffStrategy) {
this.backoffStrategy = backOffStrategy;
}
protected void runBackoffStrategy(FetchAndLockResponse... | protected void suspend(long waitTime) {
if (waitTime > 0 && isRunning.get()) {
ACQUISITION_MONITOR.lock();
try {
if (isRunning.get()) {
IS_WAITING.await(waitTime, TimeUnit.MILLISECONDS);
}
} catch (InterruptedException e) {
LOG.exceptionWhileExecutingBackoffStrate... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\topic\impl\TopicSubscriptionManager.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setSenderID(String value) {
this.senderID = value;
}
/**
* Gets the value of the recipientID property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRecipientID() {
... | *
*/
public XMLGregorianCalendar getDateTime() {
return dateTime;
}
/**
* Sets the value of the dateTime property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIMessage.java | 2 |
请完成以下Java代码 | public List<String> getResult()
{
return loadedDataLines;
}
}
/**
* Read file that has at least on filed with multiline text
* <br>
* Assumes the <code>TEXT_DELIMITER</code> is not encountered in the field
*
* @param file
* @param charset
* @return
* @throws IOException
*/
public List<Strin... | /**
* Build the preview from the loaded lines
*
* @param lines
* @return
*/
public String buildDataPreview(@NonNull final List<String> lines)
{
String dataPreview = lines.stream()
.limit(MAX_LOADED_LINES)
.collect(Collectors.joining("\n"));
if (lines.size() > MAX_LOADED_LINES)
{
dataPrevie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\FileImportReader.java | 1 |
请完成以下Java代码 | public String toString() {
return "PropertyKey [name=" + name + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this =... | return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
PropertyKey<?> other = (PropertyKey<?>) obj;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
return true;
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\PropertyKey.java | 1 |
请完成以下Java代码 | default boolean matchesAnyRowRecursive(final HUEditorRowFilter filter)
{
return streamAllRecursive(filter).findAny().isPresent();
}
/**
* Stream all rows (including children) which match any of given <code>rowIds</code>.
*
* If a rowId is included in another row (which will be returned by this method), then... | default Optional<HUEditorRow> getParentRowByChildIdOrNull(final DocumentId childId) throws EntityNotFoundException
{
final HUEditorRowId childRowId = HUEditorRowId.ofDocumentId(childId);
final HUEditorRowId topLevelRowId = childRowId.toTopLevelRowId();
final HUEditorRow topLevelRow = getById(topLevelRowId.toDocu... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorViewBuffer.java | 1 |
请完成以下Java代码 | public void setC_RfQ_Topic_ID (int C_RfQ_Topic_ID)
{
if (C_RfQ_Topic_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_RfQ_Topic_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_RfQ_Topic_ID, Integer.valueOf(C_RfQ_Topic_ID));
}
/** Get Ausschreibungs-Thema.
@return Topic for Request for Quotations
*/
@Override... | public void setOptOutDate (java.sql.Timestamp OptOutDate)
{
set_Value (COLUMNNAME_OptOutDate, OptOutDate);
}
/** Get Datum der Abmeldung.
@return Date the contact opted out
*/
@Override
public java.sql.Timestamp getOptOutDate ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_OptOutDate);
}
/** Se... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQ_TopicSubscriber.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ShipmentScheduleUpdatedHandler implements MaterialEventHandler<ShipmentScheduleUpdatedEvent>
{
private final CandidateChangeService candidateChangeHandler;
private final CandidateRepositoryRetrieval candidateRepository;
public ShipmentScheduleUpdatedHandler(
@NonNull final CandidateChangeService can... | {
updatedCandidate = Candidate
.builderForEventDescriptor(event.getEventDescriptor())
.materialDescriptor(event.getMaterialDescriptor())
.minMaxDescriptor(event.getMinMaxDescriptor())
.type(CandidateType.DEMAND)
.businessCase(CandidateBusinessCase.SHIPMENT)
.businessCaseDetail(demandDet... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\shipmentschedule\ShipmentScheduleUpdatedHandler.java | 2 |
请完成以下Java代码 | public void insert(PersonEntity personEntity) throws SQLException {
String query = "INSERT INTO persons(id, name) VALUES(" + personEntity.getId() + ", '"
+ personEntity.getName() + "')";
Statement statement = connection.createStatement();
statement.executeUpdate(query);
}
p... | }
public void deleteById(int id) throws SQLException {
String query = "DELETE FROM persons WHERE id = " + id;
Statement statement = connection.createStatement();
statement.executeUpdate(query);
}
public List<PersonEntity> getAll() throws SQLException {
String query = "SELEC... | repos\tutorials-master\persistence-modules\core-java-persistence\src\main\java\com\baeldung\statmentVsPreparedstatment\StatementPersonDao.java | 1 |
请完成以下Java代码 | public boolean isAuthenticated() {
return this.authenticated;
}
@Override
public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException {
throw new IllegalArgumentException(
"Instead of calling this setter, please call toBuilder to create a new instance");
}
@Override
public Stri... | return this;
}
@Override
public Builder details(@Nullable Object details) {
this.details = details;
return this;
}
@Override
public Builder principal(@Nullable Object principal) {
this.principal = principal;
return this;
}
@Override
public Builder credentials(@Nullable Object credential... | repos\spring-security-main\core\src\main\java\org\springframework\security\core\SimpleAuthentication.java | 1 |
请完成以下Java代码 | public class ConsoleScriptsApplierListener implements IScriptsApplierListener
{
public static final transient ConsoleScriptsApplierListener instance = new ConsoleScriptsApplierListener();
private ConsoleScriptsApplierListener()
{
}
@Override
public void onScriptApplied(final IScript script)
{
// nothing
}
... | }
if ("F".equalsIgnoreCase(answer))
{
return ScriptFailedResolution.Fail;
}
else if ("I".equalsIgnoreCase(answer))
{
return ScriptFailedResolution.Ignore;
}
else if ("R".equalsIgnoreCase(answer))
{
return ScriptFailedResolution.Retry;
}
else
{
out.println("Unknown optio... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\applier\impl\ConsoleScriptsApplierListener.java | 1 |
请完成以下Java代码 | public ValueExpression setVariable(String variable, ValueExpression expression) {
if (map.isEmpty()) {
map = new HashMap<String, ValueExpression>();
}
return map.put(variable, expression);
}
}
private Functions functions;
private Variables variabl... | /**
* Get our variable mapper.
*/
@Override
public VariableMapper getVariableMapper() {
if (variables == null) {
variables = new Variables();
}
return variables;
}
/**
* Get our resolver. Lazy initialize to a {@link SimpleResolver} if necessary.
*... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\util\SimpleContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OrderDetail implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@Column(name = "ORDER_ID")
private Long orderId;
public OrderDetail() {
}
public OrderDetail(Date orderDate, String orderDesc) {
super();
}
@Overri... | public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
OrderDetail other = (OrderDetail) obj;
if (orderId == null) {
if (other.orderId != null... | repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\hibernate\fetching\model\OrderDetail.java | 2 |
请完成以下Java代码 | public static void main(final String[] args) {
// Spring Java config
final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.getEnvironment().addActiveProfile("spring");
context.register(SpringBatchConfig.class);
context.refresh();
... | final JobLauncher jobLauncher = (JobLauncher) context.getBean("jobLauncher");
final Job job = (Job) context.getBean(batchJobName);
LOGGER.info("Starting the batch job: {}", batchJobName);
try {
// To enable multiple execution of a job with the same parameters
JobParamete... | repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batch\App.java | 1 |
请完成以下Java代码 | public class LogAdvice implements MethodInterceptor {
@Override
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRe... | //将RequestParam注解修饰的参数作为请求参数
RequestParam requestParam = parameters[i].getAnnotation(RequestParam.class);
if (requestParam != null) {
Map<String, Object> map = new HashMap<>();
String key = parameters[i].getName();
if (!StringUtils.isEmpty(requestP... | repos\spring-boot-quick-master\quick-platform-component\src\main\java\com\quick\component\config\logAspect\LogAdvice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getAD_Client_Value()
{
return AD_Client_Value;
}
public int getAD_Org_ID()
{
return AD_Org_ID;
}
public String getADInputDataDestination_InternalName()
{
return ADInputDataDestination_InternalName;
}
public BigInteger getADInputDataSourceID()
{
return ADInputDataSourceID;
}
public ... | }
public String getDeliveryRule()
{
return DeliveryRule;
}
public String getDeliveryViaRule()
{
return DeliveryViaRule;
}
public String getCurrencyISOCode()
{
return currencyISOCode;
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\excelimport\ExcelConfigurationContext.java | 2 |
请完成以下Java代码 | public int getC_RevenueRecognition_Plan_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_RevenueRecognition_Plan_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getP_Revenue_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_Va... | /** Get Total Amount.
@return Total Amount
*/
public BigDecimal getTotalAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalAmt);
if (bd == null)
return Env.ZERO;
return bd;
}
public I_C_ValidCombination getUnEarnedRevenue_A() throws RuntimeException
{
return (I_C_ValidCombination)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RevenueRecognition_Plan.java | 1 |
请完成以下Java代码 | public void registerScriptScannerClassesFor(final IScriptExecutorFactory scriptExecutorFactory)
{
for (final ScriptType scriptType : scriptExecutorFactory.getSupportedScriptTypes())
{
registerScriptScannerClass(scriptType.getFileExtension(), SingletonScriptScanner.class);
}
}
private static final String no... | {
this.scriptFactory = scriptFactory;
}
@Override
public IScriptFactory getScriptFactoryToUse()
{
if (scriptFactory != null)
{
return scriptFactory;
}
return scriptFactoryDefault;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\ScriptScannerFactory.java | 1 |
请完成以下Java代码 | public static List<AttributeKvEntry> toAttributes(List<JsonNode> attributes) {
if (!CollectionUtils.isEmpty(attributes)) {
return attributes.stream().map(attr -> {
KvEntry entry = parseValue(attr.get(KEY).asText(), attr.get(VALUE));
return new BaseAttr... | return parseNumericValue(key, value);
} else if (value.isTextual()) {
return new StringDataEntry(key, value.asText());
} else {
throw new RuntimeException(CAN_T_PARSE_VALUE + value);
}
} else {
return new JsonDataEntry(key, value.to... | repos\thingsboard-master\rest-client\src\main\java\org\thingsboard\rest\client\utils\RestJsonConverter.java | 1 |
请完成以下Java代码 | class WorkflowModel
{
private final Workflow workflow;
private final LinkedHashMap<WFNodeId, WorkflowNodeModel> nodesById = new LinkedHashMap<>();
WorkflowModel(@NonNull final Workflow workflow)
{
this.workflow = workflow;
}
public @NonNull WorkflowId getId() { return workflow.getId(); }
public @NonNull IT... | public WorkflowNodeModel getNodeById(final WFNodeId nodeId)
{
return nodesById.computeIfAbsent(nodeId, k -> {
final WFNode node = workflow.getNodeById(nodeId);
return new WorkflowNodeModel(this, node);
});
}
public List<WorkflowNodeModel> getNodesInOrder(final @NonNull ClientId clientId)
{
return workf... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WorkflowModel.java | 1 |
请完成以下Java代码 | public boolean isRequireVV ()
{
Object oo = get_Value(COLUMNNAME_RequireVV);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set User ID.
@param UserID
User ID or account number
*/
@Override
public voi... | /** Set Vendor ID.
@param VendorID
Vendor ID for the Payment Processor
*/
@Override
public void setVendorID (java.lang.String VendorID)
{
set_Value (COLUMNNAME_VendorID, VendorID);
}
/** Get Vendor ID.
@return Vendor ID for the Payment Processor
*/
@Override
public java.lang.String getVendorID ()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaymentProcessor.java | 1 |
请完成以下Java代码 | public Optional<I_M_HU> getHUByBarcode(@NonNull final String barcodeStringParam)
{
final String barcodeString = StringUtils.trimBlankToNull(barcodeStringParam);
if (barcodeString == null)
{
// shall not happen
throw new AdempiereException("No barcode provided");
}
final GlobalQRCode globalQRCode = Glo... | final WarehouseId warehouseId = IHandlingUnitsBL.extractWarehouseIdOrNull(hu);
if (warehouseId != null)
{
filter.addInArrayFilter(I_M_Packageable_V.COLUMNNAME_M_Warehouse_ID, null, warehouseId);
}
final BPartnerId bpartnerId = IHandlingUnitsBL.extractBPartnerIdOrNull(hu);
if (bpartnerId != null)
{
fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\filters\ProductBarcodeFilterServicesFacade.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() { | return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Boolean getSex() {
return sex;
}
public void setSex(Boolean sex) {
this.sex = sex;
}
} | repos\springboot-demo-master\hikari\src\main\java\com\et\hikari\entity\User.java | 1 |
请完成以下Java代码 | private ImmutableSet<PickingCandidateId> getValidPickingCandidates()
{
return getRowsNotAlreadyProcessed()
.stream()
.filter(ProductsToPickRow::isEligibleForProcessing)
.map(ProductsToPickRow::getPickingCandidateId)
.filter(Objects::nonNull)
.collect(ImmutableSet.toImmutableSet());
}
private v... | .createShipperDeliveryOrders(true)
.build()
.generateShippingDocuments();
}
private List<ProductsToPickRow> getRowsNotAlreadyProcessed()
{
return streamAllRows()
.filter(row -> !row.isProcessed())
.collect(ImmutableList.toImmutableList());
}
private boolean isPartialDeliveryAllowed()
{
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_4EyesReview_ProcessAll.java | 1 |
请完成以下Java代码 | public void assertHasAccess(@NonNull final UserId userId)
{
if (!hasAccess(userId))
{
throw new AdempiereException(NO_ACCESS_ERROR_MSG);
}
}
public boolean hasAccess(@NonNull final UserId userId)
{
return UserId.equals(getResponsibleId(), userId);
}
public <T> T getDocumentAs(@NonNull final Class<T> ... | public Optional<WFActivity> getActivityByIdOptional(@NonNull final WFActivityId id)
{
return Optional.ofNullable(activitiesById.get(id));
}
public WFProcess withChangedActivityStatus(
@NonNull final WFActivityId wfActivityId,
@NonNull final WFActivityStatus newActivityStatus)
{
return withChangedActivity... | repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\model\WFProcess.java | 1 |
请完成以下Java代码 | public class CamundaRestResources {
private static final Set<Class<?>> RESOURCE_CLASSES = new HashSet<Class<?>>();
private static final Set<Class<?>> CONFIGURATION_CLASSES = new HashSet<Class<?>>();
static {
RESOURCE_CLASSES.add(NamedProcessEngineRestServiceImpl.class);
RESOURCE_CLASSES.add(DefaultProc... | /**
* Returns a set containing all resource classes provided by Camunda Platform.
* @return a set of resource classes.
*/
public static Set<Class<?>> getResourceClasses() {
return RESOURCE_CLASSES;
}
/**
* Returns a set containing all provider / mapper / config classes used in the
* default se... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\CamundaRestResources.java | 1 |
请完成以下Java代码 | public ResponseEntity<Object> handleInvalidAuthentication(
InvalidAuthenticationException e, WebRequest request) {
return ResponseEntity.status(UNPROCESSABLE_ENTITY)
.body(
new HashMap<String, Object>() {
{
put("message", e.getMessage());
}
... | for (ConstraintViolation<?> violation : ex.getConstraintViolations()) {
FieldErrorResource fieldErrorResource =
new FieldErrorResource(
violation.getRootBeanClass().getName(),
getParam(violation.getPropertyPath().toString()),
violation.getConstraintDescriptor().... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\api\exception\CustomizeExceptionHandler.java | 1 |
请完成以下Java代码 | public Builder setGridView(final ViewLayout.Builder gridView)
{
this._gridView = gridView;
return this;
}
public Builder setSingleRowLayout(@NonNull final DocumentLayoutSingleRow.Builder singleRowLayout)
{
this.singleRowLayout = singleRowLayout;
return this;
}
private DocumentLayoutSingleRow.B... | {
this._sideListView = sideListViewLayout;
return this;
}
private ViewLayout getSideList()
{
Preconditions.checkNotNull(_sideListView, "sideList");
return _sideListView;
}
public Builder putDebugProperty(final String name, final String value)
{
debugProperties.put(name, value);
return th... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutDescriptor.java | 1 |
请完成以下Java代码 | protected String getXMLElementName() {
return ELEMENT_DI_WAYPOINT;
}
@Override
protected DmnElement convertXMLToElement(XMLStreamReader xtr, ConversionHelper conversionHelper) {
GraphicInfo graphicInfo = new GraphicInfo();
graphicInfo.setX(Double.valueOf(xtr.getAttributeValue(null, ... | conversionHelper.getCurrentDiEdge().addWaypoint(graphicInfo);
return graphicInfo;
}
@Override
protected void writeAdditionalAttributes(DmnElement element, DmnDefinition model, XMLStreamWriter xtw) throws Exception {
}
@Override
protected void writeAdditionalChildElements(DmnElement e... | repos\flowable-engine-main\modules\flowable-dmn-xml-converter\src\main\java\org\flowable\dmn\xml\converter\DmnDiWaypointXmlConverter.java | 1 |
请完成以下Java代码 | public static void schedule(@NonNull final IInvoiceCandUpdateSchedulerRequest request)
{
SCHEDULER.schedule(request);
}
private static final UpdateInvalidInvoiceCandidatesWorkpackageProcessorScheduler //
SCHEDULER = new UpdateInvalidInvoiceCandidatesWorkpackageProcessorScheduler(true/*createOneWorkpackagePerAs... | .setTaggedWithNoTag()
.setLimit(maxInvoiceCandidatesToUpdate)
.update();
//
// If we updated just a limited set of invoice candidates,
// then create a new workpackage to update the rest of them.
if (maxInvoiceCandidatesToUpdate > 0)
{
final int countRemaining = invoiceCandDAO.tagToRecompute()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\async\spi\impl\UpdateInvalidInvoiceCandidatesWorkpackageProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private MaterialDescriptor createDemandMaterialDescriptor(
@NonNull final AbstractDDOrderEvent ddOrderEvent,
@NonNull final DDOrderLine ddOrderLine)
{
final MaterialDescriptorBuilder materialDescriptorBuilder = initCommonDescriptorBuilder(ddOrderLine);
return materialDescriptorBuilder
.date(computeDate(... | .ddOrderDocStatus(ddOrder.getDocStatus())
.ddOrderRef(DDOrderRef.ofNullableDDOrderAndLineId(ddOrder.getDdOrderId(), ddOrderLine.getDdOrderLineId()))
.forwardPPOrderRef(ddOrder.getForwardPPOrderRef())
.distributionNetworkAndLineId(ddOrderLine.getDistributionNetworkAndLineId())
.qty(ddOrderLine.getQtyToMo... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\ddorder\DDOrderAdvisedOrCreatedHandler.java | 2 |
请完成以下Java代码 | public abstract class Sha512DigestUtils {
/**
* Returns an SHA digest.
* @return An SHA digest instance.
* @throws RuntimeException when a {@link java.security.NoSuchAlgorithmException} is
* caught.
*/
private static MessageDigest getSha512Digest() {
try {
return MessageDigest.getInstance("SHA-512");
... | * @param data Data to digest
* @return SHA digest as a hex string
*/
public static String shaHex(byte[] data) {
return new String(Hex.encode(sha(data)));
}
/**
* Calculates the SHA digest and returns the value as a hex string.
* @param data Data to digest
* @return SHA digest as a hex string
*/
publi... | repos\spring-security-main\core\src\main\java\org\springframework\security\core\token\Sha512DigestUtils.java | 1 |
请完成以下Java代码 | public class ActuatorServerLoadProbeWrapper implements ServerLoadProbe {
private AtomicReference<ServerMetrics> currentServerMetrics = new AtomicReference<>(null);
private final ServerLoadProbe delegate;
/**
* Constructs a new instance of {@link ActuatorServerLoadProbeWrapper} initialized with the required
* ... | * @see org.apache.geode.cache.server.ServerLoadProbe
*/
protected ServerLoadProbe getDelegate() {
return this.delegate;
}
@Override
public ServerLoad getLoad(ServerMetrics metrics) {
this.currentServerMetrics.set(metrics);
return getDelegate().getLoad(metrics);
}
@Override
public void open() {
getD... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-actuator\src\main\java\org\springframework\geode\boot\actuate\health\support\ActuatorServerLoadProbeWrapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static Double getDoubleFromJson(ObjectNode objectNode, String fieldName) {
String s = getStringFromJson(objectNode, fieldName);
if (StringUtils.isNotEmpty(s)) {
return Double.valueOf(s);
}
return null;
}
public static Long getLongFromJson(ObjectNode object... | public static Boolean getBooleanFromJson(ObjectNode objectNode, String fieldName, Boolean defaultValue) {
Boolean value = getBooleanFromJson(objectNode, fieldName);
return value != null ? value : defaultValue;
}
public static Boolean getBooleanFromJson(ObjectNode objectNode, String fieldNam... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\history\async\util\AsyncHistoryJsonUtil.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RetryExceptionJobDemo {
@Autowired
private JobBuilderFactory jobBuilderFactory;
@Autowired
private StepBuilderFactory stepBuilderFactory;
@Bean
public Job retryExceptionJob() {
return jobBuilderFactory.get("retryExceptionJob")
.start(step())
... | private ItemProcessor<String, String> myProcessor() {
return new ItemProcessor<String, String>() {
private int count;
@Override
public String process(String item) throws Exception {
System.out.println("当前处理的数据:" + item);
if (count >= 2) {
... | repos\SpringAll-master\72.spring-batch-exception\src\main\java\cc\mrbird\batch\job\RetryExceptionJobDemo.java | 2 |
请完成以下Java代码 | public boolean hasChangesRecursivelly()
{
if (singleDocument == null)
{
return false;
}
return singleDocument.hasChangesRecursivelly();
}
@Override
public void saveIfHasChanges()
{
if (singleDocument != null)
{
final DocumentSaveStatus saveStatus = singleDocument.saveIfHasChanges();
if (saveS... | singleDocument = null;
}
@Override
public void markStaleAll()
{
staled = true;
parentDocument.getChangesCollector().collectStaleDetailId(parentDocumentPath, getDetailId());
}
@Override
public void markStale(final DocumentIdsSelection rowIds)
{
markStaleAll();
}
@Override
public boolean isStale()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\SingleRowDetailIncludedDocumentsCollection.java | 1 |
请完成以下Java代码 | public void setTargetUrlParameter(String targetUrlParameter) {
if (targetUrlParameter != null) {
Assert.hasText(targetUrlParameter, "targetUrlParameter cannot be empty");
}
this.targetUrlParameter = targetUrlParameter;
}
protected @Nullable String getTargetUrlParameter() {
return this.targetUrlParameter;
... | }
protected RedirectStrategy getRedirectStrategy() {
return this.redirectStrategy;
}
/**
* If set to {@code true} the {@code Referer} header will be used (if available).
* Defaults to {@code false}.
*/
public void setUseReferer(boolean useReferer) {
this.useReferer = useReferer;
}
} | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\AbstractAuthenticationTargetUrlRequestHandler.java | 1 |
请完成以下Java代码 | public void deploy(EngineDeployment deployment, Map<String, Object> deploymentSettings) {
LOGGER.debug("Processing rules deployment {}", deployment.getName());
KnowledgeBuilder knowledgeBuilder = null;
DeploymentManager deploymentManager = CommandContextUtil.getProcessEngineConfiguration().get... | Resource droolsResource = ResourceFactory.newByteArrayResource(resourceBytes);
knowledgeBuilder.add(droolsResource, ResourceType.DRL);
}
}
if (knowledgeBuilder != null) {
KieBase kieBase = knowledgeBuilder.newKieBase();
deploymentManager.getKnowledgeB... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\rules\RulesDeployer.java | 1 |
请完成以下Java代码 | public static MHRConceptCategory forValue(Properties ctx, String value)
{
if (value == null)
{
return null;
}
final int AD_Client_ID = Env.getAD_Client_ID(ctx);
// Try cache
final String key = AD_Client_ID+"#"+value;
MHRConceptCategory cc = s_cacheValue.get(key);
if (cc != null)
{
return cc;
... | .setOrderBy("AD_Client_ID DESC")
.first();
if (cc != null)
{
s_cacheValue.put(key, cc);
s_cache.put(cc.get_ID(), cc);
}
return cc;
}
public MHRConceptCategory(Properties ctx, int HR_Concept_Category_ID, String trxName)
{
super(ctx, HR_Concept_Category_ID, trxName);
}
public MHRConceptCate... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\model\MHRConceptCategory.java | 1 |
请完成以下Java代码 | public class GetTaskAttachmentContentCmd implements Command<InputStream>, Serializable {
private static final long serialVersionUID = 1L;
protected String attachmentId;
protected String taskId;
public GetTaskAttachmentContentCmd(String taskId, String attachmentId) {
this.attachmentId = attachmentId;
... | return null;
}
String contentId = attachment.getContentId();
if (contentId==null) {
return null;
}
ByteArrayEntity byteArray = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, contentId);
byte[] bytes = byteArray.getBytes();
return new ByteArr... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetTaskAttachmentContentCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void generateHTMLReport(IReportRunnable report, HttpServletResponse response, HttpServletRequest request) {
IRunAndRenderTask runAndRenderTask = birtEngine.createRunAndRenderTask(report);
response.setContentType(birtEngine.getMIMEType("html"));
IRenderOption options = new RenderOption();... | try {
pdfRenderOption.setOutputStream(response.getOutputStream());
runAndRenderTask.run();
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
} finally {
runAndRenderTask.close();
}
}
@Override
public void destroy()... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc-birt\src\main\java\com\baeldung\birt\engine\service\BirtReportService.java | 2 |
请完成以下Java代码 | public class InstantRangeQueryFilter<T> implements IQueryFilter<T>, ISqlQueryFilter
{
private final String columnName;
private final Range<Instant> range;
private boolean sqlBuilt = false;
private String sqlWhereClause = null;
private List<Object> sqlParams = null;
private InstantRangeQueryFilter(@NonNull final... | sql.append(columnName).append(" IS NOT NULL");
if (range.hasLowerBound())
{
final String operator;
final BoundType boundType = range.lowerBoundType();
switch (boundType)
{
case OPEN:
operator = ">";
break;
case CLOSED:
operator = ">=";
break;
default:
throw new Adem... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\InstantRangeQueryFilter.java | 1 |
请完成以下Java代码 | public PageData<RuleChain> findByTenantId(UUID tenantId, PageLink pageLink) {
return findRuleChainsByTenantId(tenantId, pageLink);
}
@Override
public RuleChainId getExternalIdByInternal(RuleChainId internalId) {
return Optional.ofNullable(ruleChainRepository.getExternalIdById(internalId.get... | @Override
public List<EntityInfo> findByResource(String reference, int limit) {
return ruleChainRepository.findRuleChainsByResource(reference, PageRequest.of(0, limit));
}
@Override
public List<RuleChainFields> findNextBatch(UUID id, int batchSize) {
return ruleChainRepository.findNextB... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\rule\JpaRuleChainDao.java | 1 |
请完成以下Java代码 | protected ImportRecordResult importRecord(
final @NonNull IMutable<Object> state_NOTUSED,
final @NonNull I_I_Request importRecord,
final boolean isInsertOnly_NOTUSED)
{
//
// Create a new request
final I_R_Request request = InterfaceWrapperHelper.newInstance(I_R_Request.class, importRecord);
request.s... | request.setSummary(importRecord.getSummary());
request.setDocumentNo(importRecord.getDocumentNo());
int userid = Env.getAD_User_ID(getCtx());
request.setSalesRep_ID(userid);
//
InterfaceWrapperHelper.save(request);
//
// Link back the request to current import record
importRecord.setR_Request(request);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\request\impexp\RequestImportProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SeataRestTemplateAutoConfiguration {
@Autowired(
required = false
)
private Collection<RestTemplate> restTemplates;
@Autowired
private SeataRestTemplateInterceptor seataRestTemplateInterceptor;
public SeataRestTemplateAutoConfiguration() {
}
@Bean
public Se... | @PostConstruct
public void init() {
if (this.restTemplates != null) {
Iterator var1 = this.restTemplates.iterator();
while (var1.hasNext()) {
RestTemplate restTemplate = (RestTemplate) var1.next();
List<ClientHttpRequestInterceptor> interceptors = new... | repos\SpringBootLearning-master (1)\springboot-seata\sbm-account-service\src\main\java\com\gf\config\SeataRestTemplateAutoConfiguration.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
@Override
public java.lang.String getDescription()
{
return (j... | return get_ValueAsInt(COLUMNNAME_ServiceCompany_BPartner_ID);
}
@Override
public void setServiceFee_Product_ID (int ServiceFee_Product_ID)
{
if (ServiceFee_Product_ID < 1)
set_Value (COLUMNNAME_ServiceFee_Product_ID, null);
else
set_Value (COLUMNNAME_ServiceFee_Product_ID, Integer.valueOf(ServiceFee_Pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_InvoiceProcessingServiceCompany.java | 1 |
请完成以下Java代码 | public void registerFactoryForTableName(
@NonNull final String tableName,
@NonNull final IAttributeSetInstanceAwareFactory factory)
{
tableName2Factory.put(tableName, factory);
}
@Override
public IAttributeSetInstanceAware createOrNull(final Object referencedObj)
{
if (referencedObj == null)
{
retu... | }
else
{
return null;
}
return factory.createOrNull(referencedObj);
}
private IAttributeSetInstanceAwareFactory getFactoryForTableNameOrDefault(@NonNull final String tableName)
{
final IAttributeSetInstanceAwareFactory factory = tableName2Factory.get(tableName);
if (factory != null)
{
return fac... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\asi_aware\factory\impl\AttributeSetInstanceAwareFactoryService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class FlowableVariableEventImpl extends FlowableEngineEventImpl implements FlowableVariableEvent {
protected String variableName;
protected Object variableValue;
protected VariableType variableType;
protected String taskId;
protected String variableInstanceId;
public FlowableVariableEve... | this.variableType = variableType;
}
@Override
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
@Override
public String getVariableInstanceId() {
return variableInstanceId;
}
public void setVari... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\event\impl\FlowableVariableEventImpl.java | 2 |
请完成以下Java代码 | public final class ResourceAsPermission extends AbstractPermission implements Resource
{
public static final Permission ofName(final String name)
{
return new ResourceAsPermission(name);
}
private final String name;
private int hashcode = 0;
@ToStringBuilder(skip = true)
private final Object _resourceId;
pr... | if (this == obj)
{
return true;
}
final ResourceAsPermission other = EqualsBuilder.getOther(this, obj);
if (other == null)
{
return false;
}
return new EqualsBuilder()
.append(this.name, other.name)
.isEqual();
}
@Override
public Resource getResource()
{
return this;
}
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\ResourceAsPermission.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionName() {
return processDefinitionName;
}
public void setProcessDefinitionName(String processDefinitionName) {
this.processDefinitionName = processDefinitionName;
}
public int getProcessDefinitionVersion() {
return processDefinitionVersion;
}
public void setPr... | return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String toString() {
return this.getClass().getSimpleName()
+ "[processDefinitionId = " + processDefinitionId
+ ", processDefinitionKey = " + processDefinitionKey
+ ", processDefinit... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CleanableHistoricProcessInstanceReportResultEntity.java | 1 |
请完成以下Java代码 | private static final ViewActionMethodReturnTypeConverter createReturnTypeConverter(final Method method)
{
final Class<?> viewActionReturnType = method.getReturnType();
if (Void.class.equals(viewActionReturnType) || void.class.equals(viewActionReturnType))
{
return returnValue -> null;
}
else if (ProcessIn... | {
private final Map<String, MutableInt> methodName2counter = new HashMap<>();
public String getActionId(final Method actionMethod)
{
final String methodName = actionMethod.getName();
final MutableInt counter = methodName2counter.computeIfAbsent(methodName, k -> new MutableInt(0));
final int methodNameSu... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\view\ViewActionDescriptorsFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private List<ConfigDataResolutionResult> resolve(ConfigDataLocation location, boolean profileSpecific,
Supplier<List<? extends ConfigDataResource>> resolveAction) {
List<ConfigDataResource> resources = nonNullList(resolveAction.get());
List<ConfigDataResolutionResult> resolved = new ArrayList<>(resources.size())... | List<T> merged = new ArrayList<>(list1.size() + list2.size());
merged.addAll(list1);
merged.addAll(list2);
return merged;
}
/**
* Return the resolvers managed by this object.
* @return the resolvers
*/
List<ConfigDataLocationResolver<?>> getResolvers() {
return this.resolvers;
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataLocationResolvers.java | 2 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSourceActivityId() {
return sourceActivityId;
}
public void setSourceActivityId(String sourceActivityId) {
this.sourceActivityId = sourceActivityId;
}
... | this.targetActivityName = targetActivityName;
}
public String getTargetActivityType() {
return targetActivityType;
}
public void setTargetActivityType(String targetActivityType) {
this.targetActivityType = targetActivityType;
}
public String getSourceActivityBehaviorClass() {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\delegate\event\impl\ActivitiSequenceFlowTakenEventImpl.java | 1 |
请完成以下Java代码 | public String getCamundaCalledElementTenantId() {
return camundaCalledElementTenantIdAttribute.getValue(this);
}
public void setCamundaCalledElementTenantId(String tenantId) {
camundaCalledElementTenantIdAttribute.setValue(this, tenantId);
}
public String getCamundaCaseTenantId() {
return camundaC... | @Override
public void setCamundaVariableMappingClass(String camundaClass) {
camundaVariableMappingClassAttribute.setValue(this, camundaClass);
}
@Override
public String getCamundaVariableMappingDelegateExpression() {
return camundaVariableMappingDelegateExpressionAttribute.getValue(this);
}
@Overr... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CallActivityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void logReceivedFromMetasfresh(final String queueName, final RequestToProcurementWeb message)
{
log(queueName,
"IN",
message,
message.getEventId(),
message.getRelatedEventId());
}
private void log(
final String queueName,
final String direction,
final Object message,
final String ev... | }
}
private String convertToString(@NonNull final Object message)
{
try
{
return Constants.PROCUREMENT_WEBUI_OBJECT_MAPPER.writeValueAsString(message);
}
catch (final Exception ex)
{
logger.warn("Failed converting message to JSON: {}. Returning toString().", message, ex);
return message.toString... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\service\RabbitMQAuditService.java | 2 |
请完成以下Java代码 | public class ALayoutConstraint implements Comparable
{
/**
* Layout Constraint to indicate grid position
* @param row row 0..x
* @param col column 0..x
*/
public ALayoutConstraint(int row, int col)
{
m_row = row;
m_col = col;
} // ALayoutConstraint
/**
* Create Next in Row
* @return ALayout... | {
ALayoutConstraint comp = null;
if (o instanceof ALayoutConstraint)
comp = (ALayoutConstraint)o;
if (comp == null)
return +111;
// Row compare
int rowComp = m_row - comp.getRow();
if (rowComp != 0)
return rowComp;
// Column compare
return m_col - comp.getCol();
} // compareTo
/**
* ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ALayoutConstraint.java | 1 |
请完成以下Java代码 | public Set<CandidateId> deleteAllSimulatedCandidates()
{
cleanUpSimulatedRelatedRecords();
final DeleteCandidatesQuery deleteCandidatesQuery = DeleteCandidatesQuery.builder()
.status(X_MD_Candidate.MD_CANDIDATE_STATUS_Simulated)
.isActive(false)
.build();
return candidateService.deleteCandidatesAnd... | private void cleanUpSimulatedRelatedRecords()
{
for (final SimulatedCleanUpService cleanUpService : simulatedCleanUpServiceList)
{
try
{
cleanUpService.cleanUpSimulated();
}
catch (final Exception e)
{
Loggables.get().addLog("{0} failed to cleanup, see error: {1}", cleanUpService.getClass().... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\SimulatedCandidateService.java | 1 |
请完成以下Java代码 | public void setCaseInstanceId(String caseInstanceId) {
this.caseInstanceId = caseInstanceId;
}
public String getCaseExecutionId() {
return caseExecutionId;
}
public void setCaseExecutionId(String caseExecutionId) {
this.caseExecutionId = caseExecutionId;
}
public String getErrorMessage() {
... | public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public Date getRemovalTime() {
return removalTime;
}
public void setRemovalTime(Date removalTime) {
this.removalTime = removalTime;
}
@Override
public String toString()... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricVariableInstanceEntity.java | 1 |
请完成以下Java代码 | public static String prepareSearchString(final Object value)
{
return prepareSearchString(value, false);
}
public static String prepareSearchString(final Object value, final boolean isIdentifier)
{
if (value == null || value.toString().length() == 0)
{
return null;
}
String valueStr;
if (isIdentifie... | ; // nothing
}
else if (valueStr.endsWith("%"))
{
; // nothing
}
else if (valueStr.indexOf("%") < 0)
{
valueStr = "%" + valueStr + "%";
}
else
{
; // nothing
}
}
return valueStr;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\FindHelper.java | 1 |
请完成以下Java代码 | public void setImplementation(String implementation) {
this.implementation = implementation;
}
@Override
public String getDeploymentId() {
return deploymentId;
}
@Override
public String getCategory() {
return category;
}
@Override
public void setCategor... | }
@Override
public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
@Override
public String getTenantId() {
return tenantId;
}
@Override
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\ChannelDefinitionEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int update(Long id, UmsResource umsResource) {
umsResource.setId(id);
int count = resourceMapper.updateByPrimaryKeySelective(umsResource);
adminCacheService.delResourceListByResource(id);
return count;
}
@Override
public UmsResource getItem(Long id) {
return r... | }
if(StrUtil.isNotEmpty(nameKeyword)){
criteria.andNameLike('%'+nameKeyword+'%');
}
if(StrUtil.isNotEmpty(urlKeyword)){
criteria.andUrlLike('%'+urlKeyword+'%');
}
return resourceMapper.selectByExample(example);
}
@Override
public List<UmsResou... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\UmsResourceServiceImpl.java | 2 |
请完成以下Java代码 | public boolean isNumericKey()
{
return true;
}
@Override
public LookupDataSourceFetcher getLookupDataSourceFetcher()
{
return this;
}
@Override
public Builder newContextForFetchingById(final Object id)
{
return LookupDataSourceContext.builder(CONTEXT_LookupTableName)
.requiresAD_Language()
.put... | private LookupValuesList getAllCountriesById()
{
final Object cacheKey = "ALL";
return allCountriesCache.getOrLoad(cacheKey, this::retriveAllCountriesById);
}
private LookupValuesList retriveAllCountriesById()
{
return Services.get(ICountryDAO.class)
.getCountries(Env.getCtx())
.stream()
.map(thi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\address\AddressCountryLookupDescriptor.java | 1 |
请完成以下Java代码 | public NonCaseString trim() {
return NonCaseString.of(this.value.trim());
}
public NonCaseString replace(char oldChar, char newChar) {
return NonCaseString.of(this.value.replace(oldChar, newChar));
}
public NonCaseString replaceAll(String regex, String replacement) {
return Non... | @Override
public CharSequence subSequence(int start, int end) {
return this.value.subSequence(start, end);
}
public String[] split(String regex) {
return this.value.split(regex);
}
/**
* @return 原始字符串
*/
public String get() {
return this.value;
}
@Ov... | repos\SpringBootCodeGenerator-master\src\main\java\com\softdev\system\generator\entity\NonCaseString.java | 1 |
请完成以下Java代码 | public Claims getClaims(String token) {
return jwtParser
.parseClaimsJws(token)
.getBody();
}
/**
* @param token 需要检查的token
*/
public void checkRenewal(String token) {
// 判断是否续期token,计算token的过期时间
String loginKey = loginKey(token);
lo... | }
return null;
}
/**
* 获取登录用户RedisKey
* @param token /
* @return key
*/
public String loginKey(String token) {
Claims claims = getClaims(token);
return properties.getOnlineKey() + claims.getSubject() + ":" + getId(token);
}
/**
* 获取登录用户TokenKey
... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\security\security\TokenProvider.java | 1 |
请完成以下Java代码 | private DistributionFacetsCollection getFacets(@NonNull final DDOrderReferenceQuery query)
{
final DistributionFacetsCollector collector = DistributionFacetsCollector.builder()
.ddOrderService(ddOrderService)
.productService(productService)
.warehouseService(warehouseService)
.sourceDocService(source... | final ImmutableSet.Builder<String> actions = ImmutableSet.builder();
if (hasInTransitSchedules(jobReferences, userId))
{
actions.add(ACTION_DROP_ALL);
if (warehouseService.getTrolleyByUserId(userId).isPresent())
{
actions.add(ACTION_PRINT_IN_TRANSIT_REPORT);
}
}
return actions.build();
}
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\DistributionWorkflowLaunchersProvider.java | 1 |
请完成以下Java代码 | private void assertHUIsPicked(@NonNull final I_M_HU hu)
{
final String huStatus = hu.getHUStatus();
if (X_M_HU.HUSTATUS_Picked.equals(huStatus)
|| X_M_HU.HUSTATUS_Active.equals(huStatus))
{
// NOTE: we are also tolerating Active status
// because the HU is changed to Picked only when the picking candid... | final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class);
final SourceHUsService sourceHUsService = SourceHUsService.get();
final Collection<I_M_HU> sourceHUs = sourceHUsRepository.retrieveActualSourceHUs(ImmutableSet.of(huId));
for (final I_M_HU sourceHU : sourceHUs)
{
if (!handlingUni... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\UnProcessPickingCandidatesAndRestoreSourceHUsCommand.java | 1 |
请完成以下Java代码 | public void setUomCode(final String uomCode)
{
this.uomCode = uomCode;
this.uomCodeSet = true;
}
@NonNull
public String getOrgCode()
{
return orgCode;
}
@NonNull
public String getProductIdentifier()
{ | return productIdentifier;
}
@NonNull
public TaxCategory getTaxCategory()
{
return taxCategory;
}
@NonNull
public BigDecimal getPriceStd()
{
return priceStd;
}
} | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-pricing\src\main\java\de\metas\common\pricing\v2\productprice\JsonRequestProductPrice.java | 1 |
请完成以下Java代码 | private void addMenuItem(JPopupMenu menu, String title, WorkflowNodeTransitionModel line)
{
WFPopupItem item = new WFPopupItem(title, line);
menu.add(item);
item.addActionListener(this);
} // addMenuItem
/**
* Action Listener
*
* @param e event
*/
@Override
public void actionPerformed(ActionEvent... | */
private final WFNodeId nodeToId;
/**
* Execute
*/
public void execute()
{
// Add Line
if (m_node != null && nodeToId != null)
{
final I_AD_WF_NodeNext newLine = InterfaceWrapperHelper.newInstance(I_AD_WF_NodeNext.class);
newLine.setAD_Org_ID(OrgId.ANY.getRepoId());
newLine.setAD_W... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WFContentPanel.java | 1 |
请完成以下Java代码 | public class SpringProcessDefinitionCache implements DeploymentCache<ProcessDefinitionCacheEntry> {
private final Cache delegate;
public SpringProcessDefinitionCache(Cache delegate) {
this.delegate = delegate;
}
@Override
public ProcessDefinitionCacheEntry get(String id) {
return ... | }
@Override
public void clear() {
delegate.clear();
}
@Override
public boolean contains(String id) {
return delegate.get(id) != null;
}
public Cache getDelegate() {
return delegate;
}
} | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\cache\SpringProcessDefinitionCache.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BasicUser {
@Id
@GeneratedValue
private Long id;
private String username;
@ElementCollection
private Set<String> permissions;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUsername() { | return username;
}
public void setUsername(String username) {
this.username = username;
}
public Set<String> getPermissions() {
return permissions;
}
public void setPermissions(Set<String> permissions) {
this.permissions = permissions;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-enterprise\src\main\java\com\baeldung\osiv\model\BasicUser.java | 2 |
请完成以下Java代码 | public Map<String, AbstractHitPolicy> getHitPolicyBehaviors() {
return hitPolicyBehaviors;
}
public void setCustomHitPolicyBehaviors(Map<String, AbstractHitPolicy> customHitPolicyBehaviors) {
this.customHitPolicyBehaviors = customHitPolicyBehaviors;
}
public Map<String, AbstractHitPoli... | public String getDecisionFontName() {
return decisionFontName;
}
public DmnEngineConfiguration setDecisionFontName(String decisionFontName) {
this.decisionFontName = decisionFontName;
return this;
}
public String getLabelFontName() {
return labelFontName;
}
pub... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\DmnEngineConfiguration.java | 1 |
请完成以下Java代码 | public java.lang.String getName2()
{
return get_ValueAsString(COLUMNNAME_Name2);
}
/**
* PaymentRule AD_Reference_ID=195
* Reference name: _Payment Rule
*/
public static final int PAYMENTRULE_AD_Reference_ID=195;
/** Cash = B */
public static final String PAYMENTRULE_Cash = "B";
/** CreditCard = K */
... | {
return get_ValueAsInt(COLUMNNAME_PO_PaymentTerm_ID);
}
@Override
public void setPO_PricingSystem_ID (final int PO_PricingSystem_ID)
{
if (PO_PricingSystem_ID < 1)
set_Value (COLUMNNAME_PO_PricingSystem_ID, null);
else
set_Value (COLUMNNAME_PO_PricingSystem_ID, PO_PricingSystem_ID);
}
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_QuickInput.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setAdditionalInformation(AdditionalInformationType value) {
this.additionalInformation = value;
}
/**
* The sales value of the given list line item.
*
* @return
* possible object is
* {@link UnitPriceType }
*
*/
public UnitPriceType getSa... | * Sets the value of the taxAmount property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setTaxAmount(BigDecimal value) {
this.taxAmount = value;
}
/**
* The overall amount for this line item (net value).
*
*... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ListLineItemType.java | 2 |
请完成以下Java代码 | public String toCanonicalString() {
JsonObject json = JsonUtil.createObject();
JsonUtil.addField(json, JOB_CONFIG_COUNT_EMPTY_RUNS, countEmptyRuns);
JsonUtil.addField(json, JOB_CONFIG_EXECUTE_AT_ONCE, immediatelyDue);
JsonUtil.addField(json, JOB_CONFIG_MINUTE_FROM, minuteFrom);
JsonUtil.addField(jso... | return countEmptyRuns;
}
public void setCountEmptyRuns(int countEmptyRuns) {
this.countEmptyRuns = countEmptyRuns;
}
public boolean isImmediatelyDue() {
return immediatelyDue;
}
public void setImmediatelyDue(boolean immediatelyDue) {
this.immediatelyDue = immediatelyDue;
}
public int get... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupJobHandlerConfiguration.java | 1 |
请完成以下Java代码 | public HistoricIncidentQuery orderByCauseIncidentId() {
orderBy(HistoricIncidentQueryProperty.CAUSE_INCIDENT_ID);
return this;
}
public HistoricIncidentQuery orderByRootCauseIncidentId() {
orderBy(HistoricIncidentQueryProperty.ROOT_CAUSE_INCIDENT_ID);
return this;
}
public HistoricIncidentQuer... | public String getIncidentMessage() {
return incidentMessage;
}
public String getExecutionId() {
return executionId;
}
public String getActivityId() {
return activityId;
}
public String getFailedActivityId() {
return failedActivityId;
}
public String getProcessInstanceId() {
retur... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricIncidentQueryImpl.java | 1 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((orderId == null) ? 0 : orderId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
... | return false;
} else if (!orderId.equals(other.orderId))
return false;
return true;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\hibernate\fetching\model\OrderDetail.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public Book id(Long id) {
this.id = id;
return this;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public Book title(String title) {
this.title = title;
... | }
public Book author(Author author) {
this.author = author;
return this;
}
public void setAuthor(Author author) {
this.author = author;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj insta... | repos\Hibernate-SpringBoot-master\HibernateSpringBootFluentApiAdditionalMethods\src\main\java\com\bookstore\entity\Book.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class ControlTotal {
@XmlElement(name = "ControlTotalQualifier")
protected String controlTotalQualifier;
@XmlElement(name = "ControlTotalValue")
protected String controlTotalValue;
/**
* Gets the value of the controlTotalQualifier property.
*
... | *
* @return
* possible object is
* {@link String }
*
*/
public String getControlTotalValue() {
return controlTotalValue;
}
/**
* Sets the value of the controlTotalValue property.
*
* @param value
... | 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\DocumentExtensionType.java | 2 |
请完成以下Java代码 | public class AsyncHelper<R> implements ApiCallback<R> {
private static final Logger log = LoggerFactory.getLogger(AsyncHelper.class);
private CoreV1Api api;
private CompletableFuture<R> callResult;
private AsyncHelper(CoreV1Api api) {
this.api = api;
}
public static ... | }
@Override
public void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders) {
log.error("[E53] onFailure",e);
callResult.completeExceptionally(e);
}
@Override
public void onSuccess(R result, int statusCode, Map<String, List<String>> responseHeaders)... | repos\tutorials-master\kubernetes-modules\k8s-intro\src\main\java\com\baeldung\kubernetes\intro\AsyncHelper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setErpelBusinessDocumentHeader(ErpelBusinessDocumentHeaderType value) {
this.erpelBusinessDocumentHeader = value;
}
/**
* Gets the value of the document property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any m... | *
* <p>
* Objects of the following type(s) are allowed in the list
* {@link DocumentType }
*
*
*/
public List<DocumentType> getDocument() {
if (document == null) {
document = new ArrayList<DocumentType>();
}
return this.document;
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\message\ErpelMessageType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public TopicBuilder configs(Map<String, String> configProps) {
this.configs.putAll(configProps);
return this;
}
/**
* Set a configuration option.
* @param configName the name.
* @param configValue the value.
* @return the builder
* @see TopicConfig
*/
public TopicBuilder config(String configName, St... | public NewTopic build() {
NewTopic topic = this.replicasAssignments == null
? new NewTopic(this.name, this.partitions, this.replicas)
: new NewTopic(this.name, this.replicasAssignments);
if (!this.configs.isEmpty()) {
topic.configs(this.configs);
}
return topic;
}
/**
* Create a TopicBuilder wit... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\config\TopicBuilder.java | 2 |
请完成以下Java代码 | public void setGO_DeliveryOrder_ID (int GO_DeliveryOrder_ID)
{
if (GO_DeliveryOrder_ID < 1)
set_Value (COLUMNNAME_GO_DeliveryOrder_ID, null);
else
set_Value (COLUMNNAME_GO_DeliveryOrder_ID, Integer.valueOf(GO_DeliveryOrder_ID));
}
/** Get GO Delivery Order.
@return GO Delivery Order */
@Override
p... | return "Y".equals(oo);
}
return false;
}
/** Set Request Message.
@param RequestMessage Request Message */
@Override
public void setRequestMessage (java.lang.String RequestMessage)
{
set_Value (COLUMNNAME_RequestMessage, RequestMessage);
}
/** Get Request Message.
@return Request Message */
@Ove... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-gen\de\metas\shipper\gateway\go\model\X_GO_DeliveryOrder_Log.java | 1 |
请完成以下Java代码 | public ModificationBuilder skipCustomListeners() {
this.skipCustomListeners = true;
return this;
}
@Override
public ModificationBuilder skipIoMappings() {
this.skipIoMappings = true;
return this;
}
@Override
public ModificationBuilder setAnnotation(String annotation) {
this.annotation ... | public List<AbstractProcessInstanceModificationCommand> getInstructions() {
return instructions;
}
public void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions) {
this.instructions = instructions;
}
public boolean isSkipCustomListeners() {
return skipCustomListeners;
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ModificationBuilderImpl.java | 1 |
请完成以下Java代码 | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
pub... | */
public void setR_IssueStatus_ID (int R_IssueStatus_ID)
{
if (R_IssueStatus_ID < 1)
set_ValueNoCheck (COLUMNNAME_R_IssueStatus_ID, null);
else
set_ValueNoCheck (COLUMNNAME_R_IssueStatus_ID, Integer.valueOf(R_IssueStatus_ID));
}
/** Get Issue Status.
@return Status of an Issue
*/
public int getR... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueStatus.java | 1 |
请完成以下Java代码 | public boolean isSOPriceList ()
{
Object oo = get_Value(COLUMNNAME_IsSOPriceList);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Preis inklusive Steuern.
@param IsTaxIncluded
Tax is included in the pr... | /** Set Name.
@param Name Name */
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Name */
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Preis Präzision.
@param Pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PriceList.java | 1 |
请完成以下Java代码 | public void updateAddressString(final I_C_BPartner_Location bpLocation)
{
final int locationId = bpLocation.getC_Location_ID();
if (locationId <= 0)
{
return;
}
final int bPartnerId = bpLocation.getC_BPartner_ID();
if (bPartnerId <= 0)
{
return;
}
final IBPartnerBL bpartnerBL = Services.get(I... | @CalloutMethod(columnNames = { I_C_BPartner_Location.COLUMNNAME_ValidFrom})
public void updatePreviousId(final I_C_BPartner_Location bpLocation)
{
final int bPartnerId = bpLocation.getC_BPartner_ID();
if (bPartnerId <= 0)
{
return;
}
if (bpLocation.getValidFrom() == null)
{
return;
}
final IBP... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\bpartner\callout\C_BPartner_Location.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public RpAccount unFreezeSettAmount(String userNo, BigDecimal amount) {
RpAccount account = this.getByUserNo_IsPessimist(userNo, true);
if (account == null) {
throw AccountBizException.ACCOUNT_NOT_EXIT;
}
Date lastModifyDate = account.getEditTime();
// 不是同一天直接清0
if (!DateUtils.isSameDayWithToday(lastMod... | * @param riskDay
* 风险预存期
* @param totalAmount
* 可结算金额累计
*
*/
@Transactional(rollbackFor = Exception.class)
public void settCollectSuccess(String userNo, String collectDate, int riskDay, BigDecimal totalAmount) {
LOG.info("==>settCollectSuccess");
LOG.info(String.format("==>userNo... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\service\impl\RpAccountTransactionServiceImpl.java | 2 |
请完成以下Java代码 | public TopicSubscription setProcessDefinitionKeyIn(List<String> processDefinitionKeys) {
this.processDefinitionKeyIn = processDefinitionKeys;
return this;
}
public String getProcessDefinitionVersionTag() {
return processDefinitionVersionTag;
}
public void setProcessDefinitionVersionTag(String proc... | final int prime = 31;
int result = 1;
result = prime * result + ((topicName == null) ? 0 : topicName.hashCode());
return result;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\topic\impl\TopicSubscriptionImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DataSize getMaxHeadersSize() {
return this.maxHeadersSize;
}
public void setMaxHeadersSize(DataSize maxHeadersSize) {
this.maxHeadersSize = maxHeadersSize;
}
public DataSize getMaxDiskUsagePerPart() {
return this.maxDiskUsagePerPart;
}
public void setMaxDiskUsagePerPart(DataSize maxDiskUsagePerPar... | public void setMaxParts(Integer maxParts) {
this.maxParts = maxParts;
}
public @Nullable String getFileStorageDirectory() {
return this.fileStorageDirectory;
}
public void setFileStorageDirectory(@Nullable String fileStorageDirectory) {
this.fileStorageDirectory = fileStorageDirectory;
}
public Charset g... | repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\autoconfigure\ReactiveMultipartProperties.java | 2 |
请完成以下Java代码 | public int getC_RfQ_TopicSubscriber_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_RfQ_TopicSubscriber_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Datum der Abmeldung.
@param OptOutDate
Date the contact opted out
*/
@Override
public void setOptOutDate (java.sql.Timestam... | }
/** Set Anmeldung.
@param SubscribeDate
Date the contact actively subscribed
*/
@Override
public void setSubscribeDate (java.sql.Timestamp SubscribeDate)
{
set_Value (COLUMNNAME_SubscribeDate, SubscribeDate);
}
/** Get Anmeldung.
@return Date the contact actively subscribed
*/
@Override
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQ_TopicSubscriber.java | 1 |
请完成以下Java代码 | public class JDomParser {
private File file;
public JDomParser(File file) {
this.file = file;
}
public List<Element> getAllTitles() {
try {
SAXBuilder builder = new SAXBuilder();
Document doc = builder.build(this.getFile());
Element tutorials = doc.... | String filter = "//*[@tutId='" + id + "']";
XPathFactory xFactory = XPathFactory.instance();
XPathExpression<Element> expr = xFactory.compile(filter, Filters.element());
List<Element> node = expr.evaluate(document);
return node.get(0);
} catch (JDOMException | IO... | repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\JDomParser.java | 1 |
请完成以下Java代码 | public class WEBUI_PP_Order_IssueServiceProduct
extends WEBUI_PP_Order_Template
implements IProcessPrecondition
{
private final IHUPPOrderBL ppOrderBL = Services.get(IHUPPOrderBL.class);
private final IProductBL productBL = Services.get(IProductBL.class);
@Param(parameterName = "IsOverrideExistingValues")
pr... | protected String doIt()
{
final PPOrderLinesView ppOrder = getView();
final PPOrderLineRow issueRow = getSingleSelectedRow();
ppOrderBL.issueServiceProduct(PPOrderIssueServiceProductRequest.builder()
.ppOrderId(ppOrder.getPpOrderId())
.ppOrderBOMLineId(issueRow.getOrderBOMLineId())
.overrideExisting... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\WEBUI_PP_Order_IssueServiceProduct.java | 1 |
请完成以下Java代码 | public BigDecimal getRelativePeriod()
{
if (getColumnType().equals(COLUMNTYPE_RelativePeriod)
|| getColumnType().equals(COLUMNTYPE_SegmentValue))
return super.getRelativePeriod();
return null;
} // getRelativePeriod
/**
* Get Element Type
*/
@Override
public String getElementType()
{
if (getColumn... | setElementType(null);
setRelativePeriod(null);
}
else if (ct.equals(COLUMNTYPE_SegmentValue))
{
setCalculationType(null);
}
return true;
} // beforeSave
/**************************************************************************
/**
* Copy
* @param ctx context
* @param AD_Client_ID parent
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\report\MReportColumn.java | 1 |
请完成以下Java代码 | public boolean isEffectiveLeafNode()
{
return children.isEmpty();
}
@Nullable
public AdWindowId getAdWindowIdOrNull()
{
if (type == MenuNodeType.Window)
{
return elementId.toId(AdWindowId::ofRepoId);
}
else
{
return null;
}
}
//
//
// ------------------------------------------------------... | public Builder setCaption(final String caption)
{
this.caption = caption;
return this;
}
public Builder setCaptionBreadcrumb(final String captionBreadcrumb)
{
this.captionBreadcrumb = captionBreadcrumb;
return this;
}
public Builder setType(final MenuNodeType type, @Nullable final DocumentId e... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\menu\MenuNode.java | 1 |
请完成以下Java代码 | private String getClient(@NonNull final XmlBody body)
{
return body.getPatient().getPerson().getFamilyName() + " " + body.getPatient().getPerson().getGivenName();
}
@NonNull
private String getBillerEan(@NonNull final XmlBody body)
{
return body.getBiller().getEanParty();
}
@Nullable
private String getEmai... | {
response += employee.getFamilyName();
if (employee.getGivenName() != null)
{
response += " " + employee.getGivenName();
}
}
if (response.isEmpty())
{
return null;
}
return response;
}
@Nullable
private String getExplanation(final XmlBody body)
{
if (body.getRejected() != null)
{... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\invoice\InvoiceImportClientImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Application implements CommandLineRunner {
//https://docs.spring.io/spring/docs/5.1.6.RELEASE/spring-framework-reference/integration.html#mail
@Autowired
private JavaMailSender javaMailSender;
public static void main(String[] args) {
SpringApplication.run(Application.class, args);... | helper.setSubject("Testing from Spring Boot");
// default = text/plain
//helper.setText("Check attachment for image!");
// true = text/html
helper.setText("<h1>Check attachment for image!</h1>", true);
//FileSystemResource file = new FileSystemResource(new File("classpath:andr... | repos\spring-boot-master\email\src\main\java\com\mkyong\Application.java | 2 |
请完成以下Java代码 | public final ProcessPreconditionsResolution checkPreconditionsApplicable()
{
return ProcessPreconditionsResolution.accept()
.deriveWithCaptionOverride(buildProcessCaption());
}
private String buildProcessCaption()
{
final List<String> flags = new ArrayList<>();
if (getParentViewRowIdsSelection() != null)... | final StringBuilder caption = new StringBuilder(getClass().getSimpleName());
if (!flags.isEmpty())
{
caption.append(" (").append(Joiner.on(", ").join(flags)).append(")");
}
return caption.toString();
}
@Override
protected String doIt() throws Exception
{
return "Parent: " + getParentViewRowIdsSelecti... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\WEBUI_TestParentChildViewParams.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CodeGenerator {
public static void main(String[] args) throws InterruptedException {
AutoGenerator mpg = new AutoGenerator();
// 全局配置
GlobalConfig gc = new GlobalConfig();
String projectPath = System.getProperty("user.dir");
gc.setOutputDir(projectPath + "/src/... | }
});
cfg.setFileOutConfigList(focList);
mpg.setCfg(cfg);
mpg.setTemplate(new TemplateConfig().setXml(null));
// 策略配置
StrategyConfig strategy = new StrategyConfig();
//此处可以修改为您的表前缀
strategy.setTablePrefix(new String[] { "tb_"});
// 表名生成策略
... | repos\SpringBootLearning-master (1)\springboot-cache\src\main\java\com\gf\config\CodeGenerator.java | 2 |
请完成以下Java代码 | public byte[] getCorrelationId() {
return this.correlationId; // NOSONAR
}
@Override
public int hashCode() {
if (this.hashCode != null) {
return this.hashCode;
}
final int prime = 31;
int result = 1;
result = prime * result + Arrays.hashCode(this.correlationId);
this.hashCode = result;
return res... | int v = bytes[j] & 0xFF;
hexChars[i++] = HEX_ARRAY[v >>> 4];
hexChars[i++] = HEX_ARRAY[v & 0x0F];
if (uuid && (j == 3 || j == 5 || j == 7 || j == 9)) {
hexChars[i++] = '-';
}
}
return new String(hexChars);
}
@Override
public String toString() {
if (this.asString == null) {
this.asString = b... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\requestreply\CorrelationKey.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setEDICctop120VID(BigInteger value) {
this.ediCctop120VID = value;
}
/**
* Gets the value of the isoCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getISOCode() {
return isoCode;
}
/**... | * allowed object is
* {@link BigInteger }
*
*/
public void setNetDays(BigInteger value) {
this.netDays = value;
}
/**
* Gets the value of the singlevat property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctop120VType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class SysLog implements Serializable {
@Id
@Column(name = "log_id")
@ApiModelProperty(value = "ID")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "操作用户")
private String username;
@ApiModelProperty(value = "描述")
private String... | private String browser;
@ApiModelProperty(value = "请求耗时")
private Long time;
@ApiModelProperty(value = "异常详细")
private byte[] exceptionDetail;
/** 创建日期 */
@CreationTimestamp
@ApiModelProperty(value = "创建日期:yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "y... | repos\eladmin-master\eladmin-logging\src\main\java\me\zhengjie\domain\SysLog.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.