instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public VPanelFormFieldBuilder setSameLine(boolean sameLine)
{
this.sameLine = sameLine;
return this;
}
private boolean isMandatory()
{
return mandatory;
}
/**
* Default: {@link #DEFAULT_Mandatory}
*
* @param mandatory true if this field shall be marked as mandatory
*/
public VPanelFormFieldBuild... | this.AD_Column_ID = AD_Column_ID;
return this;
}
public VPanelFormFieldBuilder setAD_Column_ID(final String tableName, final String columnName)
{
return setAD_Column_ID(Services.get(IADTableDAO.class).retrieveColumn(tableName, columnName).getAD_Column_ID());
}
private EventListener getEditorListener()
{
/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\VPanelFormFieldBuilder.java | 1 |
请完成以下Java代码 | protected void prepare()
{
for (ProcessInfoParameter para : getParametersAsArray())
{
final String name = para.getParameterName();
if (para.getParameter() == null)
;
else if (X_T_BoilerPlate_Spool.COLUMNNAME_MsgText.equals(name))
{
p_MsgText = para.getParameter().toString();
}
else if ("A... | }
private void createRecord(String text)
{
MADBoilerPlate.createSpoolRecord(getCtx(), getAD_Client_ID(), getPinstanceId(), text, get_TrxName());
}
private boolean isJasperReport()
{
final String whereClause = I_AD_Process.COLUMNNAME_AD_Process_ID + "=?"
+ " AND " + I_AD_Process.COLUMNNAME_JasperReport + ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\report\AD_BoilerPlate_Report.java | 1 |
请完成以下Java代码 | public String getDbType()
{
return dbType;
}
@Override
public String getDbHostname()
{
return dbHostname;
}
@Override
public String getDbPort()
{
return dbPort;
}
@Override
public String getDbName()
{
return dbName;
}
@Override
public String getDbUser()
{
return dbUser;
}
@Override
pu... | if (dbDriver == null)
{
throw new IllegalStateException("No driver found for database type: " + dbType);
}
}
try
{
if (conn != null && !conn.isClosed())
{
return conn;
}
final ISQLDatabaseDriver dbDriver = SQLDatabaseDriverFactory.get().getSQLDatabaseDriver(dbType);
conn = dbDriver.... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\impl\SQLDatabase.java | 1 |
请完成以下Spring Boot application配置 | #\u89E3\u51B3\u4E2D\u6587\u4E71\u7801\u95EE\u9898
server.tomcat.uri-encoding=UTF-8
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
spring.messages.encoding=UTF-8
spring.profiles.active=prod
#server.context-path=/helloboot
#server.port=8081
#logging.file=/home/sang/w... | og.log
#logging.level.org.springframework.web=debug
book.author=\u7F57\u8D2F\u4E2D
book.name=\u4E09\u56FD\u6F14\u4E49
book.pinyin=sanguoyanyi | repos\JavaEETest-master\Test19-SpringBoot2\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public static Integer graterThanZeroOrNull(@Nullable final Integer value)
{
return Optional.ofNullable(value)
.filter(v1 -> v1 > 0)
.orElse(null);
}
public static boolean isZeroOrNull(@Nullable final BigDecimal value)
{
if (value == null)
{
return true;
}
else return value.compareTo(BigDecima... | return 0;
}
for (final Supplier<Integer> supplier : suppliers)
{
if (supplier == null)
{
continue;
}
final Integer value = supplier.get();
if (value != null && value != 0)
{
return value;
}
}
return 0;
}
@NonNull
public static BigDecimal roundTo5Cent(@NonNull final BigDecim... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\NumberUtils.java | 1 |
请完成以下Java代码 | public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getUseStatus() {
return useStatus;
}
public void setUseStatus(Integer useStatus) {
this.useStatus = useStatus;
}
... | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", couponId=").append(couponId);
sb.append(", memberId=").a... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsCouponHistory.java | 1 |
请完成以下Java代码 | protected boolean canSerializeValue(Object value) {
if (value instanceof Spin<?>) {
Spin<?> wrapper = (Spin<?>) value;
return wrapper.getDataFormatName().equals(serializationDataFormat);
}
return false;
}
protected byte[] serializeToByteArray(Object deserializedObject) throws Exception {
... | ByteArrayInputStream bais = new ByteArrayInputStream(object);
InputStreamReader inReader = new InputStreamReader(bais, Context.getProcessEngineConfiguration().getDefaultCharset());
BufferedReader bufferedReader = new BufferedReader(inReader);
try {
Object wrapper = dataFormat.getReader().readInput(bu... | repos\camunda-bpm-platform-master\engine-plugins\spin-plugin\src\main\java\org\camunda\spin\plugin\impl\SpinValueSerializer.java | 1 |
请完成以下Java代码 | public IHUStorageDAO getHUStorageDAO()
{
return storageDAO;
}
@Override
@NonNull
public List<IHUProductStorage> getHUProductStorages(@NonNull final List<I_M_HU> hus, final ProductId productId)
{
return hus.stream()
.map(this::getStorage)
.map(huStorage -> huStorage.getProductStorageOrNull(productId))... | @Override
public IHUProductStorage getProductStorage(@NonNull final I_M_HU hu, @NonNull ProductId productId)
{
return getStorage(hu).getProductStorage(productId);
}
@Override
public @NonNull ImmutableMap<HuId, Set<ProductId>> getHUProductIds(@NonNull final List<I_M_HU> hus)
{
final Map<HuId, Set<ProductId>> ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\DefaultHUStorageFactory.java | 1 |
请完成以下Java代码 | public Course getCourse() {
return course;
}
public void setCourse(Course course) {
this.course = course;
}
public LocalDateTime getRegisteredAt() {
return registeredAt;
}
public void setRegisteredAt(LocalDateTime registeredAt) {
this.registeredAt = registeredA... | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CourseRegistration other = (CourseRegistration) obj;
if (id == null) {
if... | repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\manytomany\model\CourseRegistration.java | 1 |
请完成以下Java代码 | public abstract class TbAbstractSubCtx {
@Getter
protected final Lock wsLock = new ReentrantLock(true);
protected final String serviceId;
protected final SubscriptionServiceStatistics stats;
private final WebSocketService wsService;
protected final TbLocalSubscriptionService localSubscriptionSe... | public CustomerId getCustomerId() {
return sessionRef.getSecurityCtx().getCustomerId();
}
public UserId getUserId() {
return sessionRef.getSecurityCtx().getId();
}
public EntityId getOwnerId() {
var customerId = getCustomerId();
return customerId != null && !customerId.... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbAbstractSubCtx.java | 1 |
请完成以下Java代码 | public class MultiInstanceParser extends BaseChildElementParser {
private final List<ElementParser<MultiInstanceLoopCharacteristics>> multiInstanceElementParsers;
public MultiInstanceParser() {
this(
asList(
new LoopCardinalityParser(),
new MultiInstanceData... | try {
do {
ElementParser<MultiInstanceLoopCharacteristics> matchingParser = multiInstanceElementParsers
.stream()
.filter(elementParser -> elementParser.canParseCurrentElement(xtr))
.findFirst()
.orElse(null);
... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\child\multi\instance\MultiInstanceParser.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OldAndNewValues<T>
{
@Nullable T oldValue;
@Nullable T newValue;
public static <T> OldAndNewValues<T> ofOldAndNewValues(
@Nullable final T oldValue,
@Nullable final T newValue)
{
if (oldValue == null && newValue == null)
{
return nullValues();
}
return OldAndNewValues.<T>builder().ol... | if (this.equals(result))
{
//noinspection unchecked
return (OldAndNewValues<NT>)this;
}
return result;
}
public <NT> OldAndNewValues<NT> map(@NonNull final Function<T, NT> mapper)
{
final OldAndNewValues<NT> result = ofOldAndNewValues(
mapper.apply(oldValue),
mapper.apply(newValue)
);
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\OldAndNewValues.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getProjectId() {
return this.projectId;
}
public void setProjectId(@Nullable String projectId) {
this.projectId = projectId;
}
public String getResourceType() {
return this.resourceType;
}
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
... | return this.useSemanticMetricTypes;
}
public void setUseSemanticMetricTypes(boolean useSemanticMetricTypes) {
this.useSemanticMetricTypes = useSemanticMetricTypes;
}
public String getMetricTypePrefix() {
return this.metricTypePrefix;
}
public void setMetricTypePrefix(String metricTypePrefix) {
this.metri... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\stackdriver\StackdriverProperties.java | 2 |
请完成以下Java代码 | public boolean hasPermission(Object target, Object permission) {
return permissionEvaluator.hasPermission(authentication, target, permission);
}
@Override
public boolean hasPermission(Object targetId, String targetType, Object permission) {
return permissionEvaluator.hasPermission(authentic... | @Override
public Object getReturnObject() {
return this.returnObject;
}
@Override
public Object getThis() {
return this;
}
@Override
public void setFilterObject(Object obj) {
this.filterObject = obj;
}
@Override
public void setReturnObject(Object obj) {... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\security\MySecurityExpressionRoot.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getIndoorPic() {
return indoorPic;
}
public void setIndoorPic(String indoorPic) {
this.indoorPic = indoorPic;
}
public String getMerchantShortname() {
return merchantShortname;
}
public void setMerchantShortname(String merchantShortname) {
this.me... | }
public void setContactPhone(String contactPhone) {
this.contactPhone = contactPhone;
}
@Override
public String toString() {
return "RpMicroSubmitRecord{" +
"businessCode='" + businessCode + '\'' +
", subMchId='" + subMchId + '\'' +
", i... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\entity\RpMicroSubmitRecord.java | 2 |
请完成以下Java代码 | public void destroy() throws Exception {
if (processEngine != null) {
processEngine.close();
}
}
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
public ProcessEngine get... | }
}
protected void configureExternallyManagedTransactions() {
if (processEngineConfiguration instanceof SpringProcessEngineConfiguration) {
// remark: any config can be injected, so we cannot have SpringConfiguration as member
SpringProcessEngineConfiguration engineConfiguration... | repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\ProcessEngineFactoryBean.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static class ProcessCaptionOverrideMapper implements ProcessCaptionMapper
{
@NonNull ITranslatableString captionOverride;
public ProcessCaptionOverrideMapper(@NonNull final ITranslatableString captionOverride)
{
this.captionOverride = captionOverride;
}
public ProcessCaptionOverrideMapper(@NonNu... | public ProcessPreconditionsResolution and(final Supplier<ProcessPreconditionsResolution> resolutionSupplier)
{
if (isRejected())
{
return this;
}
return resolutionSupplier.get();
}
public void throwExceptionIfRejected()
{
if (isRejected())
{
throw new AdempiereException(getRejectReason());
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessPreconditionsResolution.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setSettFee(BigDecimal settFee) {
this.settFee = settFee;
}
/**
* 结算打款金额
*
* @return
*/
public BigDecimal getRemitAmount() {
return remitAmount;
}
/**
* 结算打款金额
*
* @param remitAmount
*/
public void setRemitAmount(BigDecimal remitAmount) {
this.remitAmount = remitAmount;
}
/... | /**
* 打款备注
*
* @return
*/
public String getRemitRemark() {
return remitRemark;
}
/**
* 打款备注
*
* @param remitRemark
*/
public void setRemitRemark(String remitRemark) {
this.remitRemark = remitRemark == null ? null : remitRemark.trim();
}
/**
* 操作员登录名
*
* @return
*/
public String g... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\entity\RpSettRecord.java | 2 |
请完成以下Java代码 | private void lock1(User a, User b) {
// 使用原生的HashCode方法,防止hashCode方法被重写导致的一些问题,
// 如果能确保use对象中的id是唯一且不会重复,可以直接使用userId
int aHashCode = System.identityHashCode(a);
int bHashCode = System.identityHashCode(b);
if (aHashCode > bHashCode) {
synchronized (a) {
... | while (true) {
try {
if (a.getLock().tryLock()) {
try {
if (b.getLock().tryLock()) {
System.out.println(Thread.currentThread().getName() + " 死锁示例");
break;
}
... | repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\LockTest.java | 1 |
请完成以下Java代码 | public void setAD_Role_ID (int AD_Role_ID)
{
if (AD_Role_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID));
}
/** Get Rolle.
@return Responsibility Role
*/
@Override
public int getAD_Role_ID ()
{
Integer ii = (In... | set_ValueNoCheck (COLUMNNAME_AD_Workflow_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID));
}
/** Get Workflow.
@return Workflow or combination of tasks
*/
@Override
public int getAD_Workflow_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_I... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Workflow_Access.java | 1 |
请完成以下Java代码 | public void setQtyToOrder (BigDecimal QtyToOrder)
{
set_Value (COLUMNNAME_QtyToOrder, QtyToOrder);
}
/** Get Quantity to Order.
@return Quantity to Order */
public BigDecimal getQtyToOrder ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyToOrder);
if (bd == null)
return Env.ZERO;
return b... | /** ReplenishType AD_Reference_ID=164 */
public static final int REPLENISHTYPE_AD_Reference_ID=164;
/** Maintain Maximum Level = 2 */
public static final String REPLENISHTYPE_MaintainMaximumLevel = "2";
/** Manual = 0 */
public static final String REPLENISHTYPE_Manual = "0";
/** Reorder below Minimum Level = 1 */... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_Replenish.java | 1 |
请完成以下Java代码 | public SignalRestService getSignalRestService(@PathParam("name") String engineName) {
return super.getSignalRestService(engineName);
}
@Override
@Path("/{name}" + ConditionRestService.PATH)
public ConditionRestService getConditionRestService(@PathParam("name") String engineName) {
return super.getCondi... | ProcessEngineProvider provider = getProcessEngineProvider();
Set<String> engineNames = provider.getProcessEngineNames();
List<ProcessEngineDto> results = new ArrayList<ProcessEngineDto>();
for (String engineName : engineNames) {
ProcessEngineDto dto = new ProcessEngineDto();
dto.setName(engineN... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\NamedProcessEngineRestServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WidgetsBundleImportService extends BaseEntityImportService<WidgetsBundleId, WidgetsBundle, WidgetsBundleExportData> {
private final WidgetsBundleService widgetsBundleService;
private final WidgetTypeService widgetTypeService;
@Override
protected void setOwner(TenantId tenantId, WidgetsBun... | } else {
widgetType.setId(existingWidgetType.getId());
widgetType.setCreatedTime(existingWidgetType.getCreatedTime());
}
widgetTypeService.saveWidgetType(widgetType);
});
}
WidgetsBundle savedWidgetsBundle = widgetsBundl... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\WidgetsBundleImportService.java | 2 |
请完成以下Java代码 | public class BetweenQueryFilter<T> implements IQueryFilter<T>, ISqlQueryFilter
{
private final CompositeQueryFilter<T> filter;
public BetweenQueryFilter(final String tableName, final String columnName, final Object valueFrom, final Object valueTo)
{
this(tableName, columnName, valueFrom, valueTo, NullQueryFilterM... | @Override
public String getSql()
{
return filter.getSql();
}
@Override
public List<Object> getSqlParams(Properties ctx)
{
return filter.getSqlParams(ctx);
}
@Override
public boolean accept(final T model)
{
return filter.accept(model);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\BetweenQueryFilter.java | 1 |
请完成以下Java代码 | static PackingInfo extractPackingInfo(@NonNull final I_M_ShipmentSchedule record)
{
final BigDecimal qtyCUsPerTU = record.getQtyItemCapacity();
if (qtyCUsPerTU == null || qtyCUsPerTU.signum() <= 0)
{
return PackingInfo.NONE;
}
else
{
return PackingInfo.builder()
.qtyCUsPerTU(qtyCUsPerTU)
.d... | private BigDecimal extractQtyToDeliverCatchOverride(@NonNull final I_M_ShipmentSchedule record)
{
return shipmentScheduleBL
.getCatchQtyOverride(record)
.map(qty -> qty.toBigDecimal())
.orElse(null);
}
private int extractSalesOrderLineNo(final I_M_ShipmentSchedule record)
{
final OrderAndLineId sal... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\shipment_candidates_editor\ShipmentCandidateRowsLoader.java | 1 |
请完成以下Java代码 | public void setSearchSubtree(boolean searchSubtree) {
this.searchControls
.setSearchScope(searchSubtree ? SearchControls.SUBTREE_SCOPE : SearchControls.ONELEVEL_SCOPE);
}
/**
* The time to wait before the search fails; the default is zero, meaning forever.
* @param searchTimeLimit the time limit for the sea... | */
public void setReturningAttributes(String[] attrs) {
this.searchControls.setReturningAttributes(attrs);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName()).append(" [");
sb.append("searchFilter=").append(this.searchFilter).append("; ");
... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\search\FilterBasedLdapUserSearch.java | 1 |
请完成以下Java代码 | private static final String removeLeftZeros(final String value)
{
final int size = value.length();
int counter;
for (counter = 0; counter < size; counter++)
{
if (value.charAt(counter) != '0')
{
break;
}
}
if (counter == size)
{
return value;
}
else
{
return value.substring(count... | {
final StringBuilder sb = new StringBuilder();
sb.append(bankAccount);
sb.append(org);
sb.append(bPartner);
sb.append(invoice);
try
{
final IESRImportBL esrImportBL = Services.get(IESRImportBL.class);
final int checkDigit = esrImportBL.calculateESRCheckDigit(sb.toString());
return checkDigit;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\api\InvoiceReferenceNos.java | 1 |
请完成以下Java代码 | public static void apply(GridWindowVO vo)
{
for (MUserDefWin uw : get(vo.getCtx(), vo.getAdWindowId()))
{
// vo.Name = uw.getName();
// vo.Description = uw.getDescription();
// vo.Help = uw .getHelp();
vo.setReadWrite(!uw.isReadOnly());
}
}
/**
* Apply customizations to given GridTabVO
* @return... | final List<MUserDefTab> list = new Query(getCtx(), MUserDefTab.Table_Name, whereClause, get_TrxName())
.setParameters(get_ID())
.setOnlyActiveRecords(true)
.setOrderBy(MUserDefTab.COLUMNNAME_AD_Tab_ID)
.list(MUserDefTab.class);
//
m_tabs = list.toArray(new MUserDefTab[0]);
return m... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MUserDefWin.java | 1 |
请完成以下Java代码 | public Class<? extends BaseElement> getBpmnElementType() {
return ScriptTask.class;
}
@Override
protected String getXMLElementName() {
return ELEMENT_TASK_SCRIPT;
}
@Override
protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
... | writeQualifiedAttribute(
ATTRIBUTE_TASK_SCRIPT_AUTO_STORE_VARIABLE,
String.valueOf(scriptTask.isAutoStoreVariables()),
xtw
);
}
@Override
protected void writeAdditionalChildElements(BaseElement element, BpmnModel model, XMLStreamWriter xtw)
throws Excepti... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\ScriptTaskXMLConverter.java | 1 |
请完成以下Java代码 | private UserView loginUser(String password, User user) {
var encodedPassword = user.getEncodedPassword();
if (!passwordService.matchesRowPasswordWithEncodedPassword(password, encodedPassword)) {
throw new InvalidRequestException("Password", "invalid");
}
return createAuthenti... | var encodedPassword = passwordService.encodePassword(rowPassword);
var id = UUID.randomUUID().toString();
var user = request.toUser(encodedPassword, id);
return userRepository
.save(user)
.map(this::createAuthenticationResponse);
}
private InvalidRequestE... | repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\user\CredentialsService.java | 1 |
请完成以下Java代码 | private Optional<ch.qos.logback.classic.Logger> getLogger() {
return Optional.ofNullable(this.logger);
}
private Context resolveContext() {
return this.context != null
? this.context
: Optional.ofNullable(LoggerFactory.getILoggerFactory())
.filter(Context.class::isInstance)
.map(Context.cl... | }
}
private final StringAppenderWrapper stringAppenderWrapper;
protected StringAppender(StringAppenderWrapper stringAppenderWrapper) {
if (stringAppenderWrapper == null) {
throw new IllegalArgumentException("StringAppenderWrapper must not be null");
}
this.stringAppenderWrapper = stringAppenderWrapper;
... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-starters\spring-geode-starter-logging\src\main\java\org\springframework\geode\logging\slf4j\logback\StringAppender.java | 1 |
请完成以下Java代码 | public static boolean isValid(Pageable layout)
{
return true;
}
public static boolean isLicensed()
{
return true;
}
/**
* Converts given image to PDF.
*
* @param image
* @return PDF file as bytes array.
*/
public static byte[] toPDFBytes(final BufferedImage image)
{
try
{
//
// PDF Ima... | final com.itextpdf.text.Rectangle pageSize = new com.itextpdf.text.Rectangle(0, 0,
(int)(pdfImage.getWidth() + 100),
(int)(pdfImage.getHeight() + 100));
// PDF document
final com.itextpdf.text.Document document = new com.itextpdf.text.Document(pageSize, 50, 50, 50, 5... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\pdf\Document.java | 1 |
请完成以下Java代码 | public class ThirdLoginModel implements Serializable {
private static final long serialVersionUID = 4098628709290780891L;
/**
* 第三方登录 来源
*/
private String source;
/**
* 第三方登录 uuid
*/
private String uuid;
/**
* 第三方登录 username
*/
private String username;
/... | /**
* 构造器
* @param source
* @param uuid
* @param username
* @param avatar
*/
public ThirdLoginModel(String source,String uuid,String username,String avatar){
this.source = source;
this.uuid = uuid;
this.username = username;
this.avatar = avatar;
}
... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\model\ThirdLoginModel.java | 1 |
请完成以下Java代码 | public void setProjInvoiceRule (final java.lang.String ProjInvoiceRule)
{
set_Value (COLUMNNAME_ProjInvoiceRule, ProjInvoiceRule);
}
@Override
public java.lang.String getProjInvoiceRule()
{
return get_ValueAsString(COLUMNNAME_ProjInvoiceRule);
}
@Override
public void setQty (final @Nullable BigDecimal Qt... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ProjectTask.java | 1 |
请完成以下Java代码 | public int getNatureFrequency(String nature)
{
try
{
Nature pos = Nature.create(nature);
return getNatureFrequency(pos);
}
catch (IllegalArgumentException e)
{
return 0;
}
}
/... | out.writeInt(totalFrequency);
out.writeInt(nature.length);
for (int i = 0; i < nature.length; ++i)
{
out.writeInt(nature[i].ordinal());
out.writeInt(frequency[i]);
}
}
}
/**
* 获取词语的ID
*
* @param a 词语
* @... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\CoreDictionary.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public HTRSD1 getHTRSD1() {
return htrsd1;
}
/**
* Sets the value of the htrsd1 property.
*
* @param value
* allowed object is
* {@link HTRSD1 }
*
*/
public void setHTRSD1(HTRSD1 value) {
this.htrsd1 = value;
}
/**
* Gets the va... | * This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the detail property.
*
* <p>
* For example, to add a n... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_orders\de\metas\edi\esb\jaxb\stepcom\orders\HEADERXbest.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getReferenceDescription() {
return getReferenceDescription(this.resource, this.location);
}
/**
* Create a new {@link ConfigDataResourceNotFoundException} instance with a location.
* @param location the location to set
* @return a new {@link ConfigDataResourceNotFoundException} instance
*/
C... | }
/**
* Throw a {@link ConfigDataNotFoundException} if the specified {@link File} does not
* exist.
* @param resource the config data resource
* @param fileToCheck the file to check
*/
public static void throwIfDoesNotExist(ConfigDataResource resource, File fileToCheck) {
throwIfNot(resource, fileToCheck... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataResourceNotFoundException.java | 2 |
请完成以下Spring Boot application配置 | server:
port: 8080
servlet:
context-path: /demo
spring:
redis:
host: localhost
# 连接超时时间(记得添加单位,Duration)
timeout: 10000ms
# Redis默认情况下有16个分片,这里配置具体使用的分片
# database: 0
lettuce:
pool:
# 连接池最大连接数(使用负值表示没有限制) 默认 8
max-active: 8
# 连接池最大阻塞等待时间(使用负 | 值表示没有限制) 默认 -1
max-wait: -1ms
# 连接池中的最大空闲连接 默认 8
max-idle: 8
# 连接池中的最小空闲连接 默认 0
min-idle: 0 | repos\spring-boot-demo-master\demo-ratelimit-redis\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public static void logFieldDetails() {
JavaClass solarSystemClass = heap.getJavaClassByName("com.baeldung.netbeanprofiler.galaxy.SolarSystem");
if (solarSystemClass == null) {
LOGGER.error("Class not found");
return;
}
List<Field> fields = solarSystemClass.getFie... | break;
default:
other++;
}
if (threadObj + jniGlobal + jniLocal + javaFrame + other <= 10) {
LOGGER.info(" GC Root: " + instance.getJavaClass().getName());
LOGGER.info(" Kind: " + kind);
LOGGER.info(" Siz... | repos\tutorials-master\core-java-modules\core-java-perf-2\src\main\java\com\baeldung\netbeanprofiler\SolApp.java | 1 |
请完成以下Java代码 | public boolean isRequiredMailAddres ()
{
Object oo = get_Value(COLUMNNAME_IsRequiredMailAddres);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/**
* MarketingPlatformGatewayId AD_Reference_ID=540858
* Referen... | {
if (MKTG_Platform_ID < 1)
set_ValueNoCheck (COLUMNNAME_MKTG_Platform_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MKTG_Platform_ID, Integer.valueOf(MKTG_Platform_ID));
}
/** Get MKTG_Platform.
@return MKTG_Platform */
@Override
public int getMKTG_Platform_ID ()
{
Integer ii = (Integer)get_Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_Platform.java | 1 |
请完成以下Java代码 | public void setAD_User_ID (int AD_User_ID)
{
if (AD_User_ID < 1)
set_Value (COLUMNNAME_AD_User_ID, null);
else
set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
}
/** Get User/Contact.
@return User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID (... | /** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Valid from.
@param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (Timestamp ValidFrom)
{
set_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrgAssignment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getMetaInfo() {
return metaInfo;
}
public void setMetaInfo(String metaInfo) {
this.metaInfo = metaInfo;
this.metaInfoChanged = true;
}
@ApiModelProperty(example = "7")
public String getDeploymentId() {
return deploymentId;
}
public void setDep... | @JsonIgnore
public boolean isNameChanged() {
return nameChanged;
}
@JsonIgnore
public boolean isVersionChanged() {
return versionChanged;
}
@JsonIgnore
public boolean isDeploymentChanged() {
return deploymentChanged;
}
@JsonIgnore
public boolean isTenan... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ModelRequest.java | 2 |
请完成以下Java代码 | public final class PlainStringLoggable implements ILoggable
{
private final List<String> messages = new ArrayList<>();
PlainStringLoggable()
{
}
@Override
public ILoggable addLog(String msg, Object... msgParameters)
{
final String formattedMessage = StringUtils.formatMessage(msg, msgParameters);
messages.a... | {
return messages.isEmpty();
}
public ImmutableList<String> getSingleMessages()
{
return ImmutableList.copyOf(messages);
}
public String getConcatenatedMessages()
{
return Joiner.on("\n").join(messages);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\PlainStringLoggable.java | 1 |
请完成以下Java代码 | public void notify(DmnDecisionEvaluationEvent evaluationEvent) {
HistoryEvent historyEvent = createHistoryEvent(evaluationEvent);
if(historyEvent != null) {
Context.getProcessEngineConfiguration()
.getHistoryEventHandler()
.handleEvent(historyEvent);
}
}
protected HistoryEvent cre... | return eventProducer.createDecisionEvaluatedEvt(caseExecution, evaluationEvent);
}
}
return eventProducer.createDecisionEvaluatedEvt(evaluationEvent);
} else {
return null;
}
}
protected boolean isDeployedDecisionTable(DmnDecision decision) {
if(decision instanceof Decision... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\parser\HistoryDecisionEvaluationListener.java | 1 |
请完成以下Java代码 | protected void definitionAddedToDeploymentCache(DeploymentEntity deployment, DefinitionEntity definition, Properties properties) {
// do nothing
}
/**
* per default we increment the latest definition version by one - but you
* might want to hook in some own logic here, e.g. to align definition
* versi... | String definitionId = definitionKey
+ ":" + definitionVersion
+ ":" + nextId;
// ACT-115: maximum id length is 64 characters
if (definitionId.length() > 64) {
definitionId = nextId;
}
return definitionId;
}
protected ProcessEngineConfigurationImpl getProcessEngineConfiguration() ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\AbstractDefinitionDeployer.java | 1 |
请完成以下Java代码 | public class DATEV_CreateExportLines extends JavaProcess implements IProcessPrecondition
{
private final DATEVExportLinesRepository datevExportLinesRepo = SpringContextHolder.instance.getBean(DATEVExportLinesRepository.class);
private final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class);
private static... | }
@Override
protected String doIt() throws Exception
{
final int countCreated = datevExportLinesRepo.createLines(
DATEVExportCreateLinesRequest.builder()
.datevExportId(DATEVExportId.ofRepoId(getRecord_ID()))
.now(SystemTime.asInstant())
.userId(getUserId())
.isOneLinePerInvoiceTax(isO... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\process\DATEV_CreateExportLines.java | 1 |
请完成以下Java代码 | public Builder modifiers(int modifiers) {
this.modifiers = modifiers;
return this;
}
/**
* Sets the return type.
* @param returnType the return type
* @return this for method chaining
*/
public Builder returning(String returnType) {
this.returnType = returnType;
return this;
}
/**
... | public Builder parameters(Parameter... parameters) {
this.parameters = Arrays.asList(parameters);
return this;
}
/**
* Sets the body.
* @param code the code for the body
* @return the method for the body
*/
public GroovyMethodDeclaration body(CodeBlock code) {
return new GroovyMethodDeclarat... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\groovy\GroovyMethodDeclaration.java | 1 |
请完成以下Java代码 | private void updateNotInAnyWarehouseFlag()
{
notInAnyWarehouse = onlyInWarehouseIds.isEmpty();
}
public void addOnlyInLocatorRepoId(final int locatorId)
{
Check.assumeGreaterThanZero(locatorId, "locatorId");
onlyInLocatorIds.add(locatorId);
}
public void addOnlyInLocatorId(@NonNull final LocatorId locator... | }
public void addOnlyInLocatorIds(final Collection<LocatorId> locatorIds)
{
if (locatorIds != null && !locatorIds.isEmpty())
{
locatorIds.forEach(this::addOnlyInLocatorId);
}
}
public void setExcludeAfterPickingLocator(final boolean excludeAfterPickingLocator)
{
this.excludeAfterPickingLocator = exclu... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUQueryBuilder_Locator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ServerTransportConfig {
public static final int DEFAULT_PORT = 18730;
public static final int DEFAULT_IDLE_SECONDS = 600;
private Integer port;
private Integer idleSeconds;
public ServerTransportConfig() {
this(DEFAULT_PORT, DEFAULT_IDLE_SECONDS);
}
public ServerTran... | }
public ServerTransportConfig setIdleSeconds(Integer idleSeconds) {
this.idleSeconds = idleSeconds;
return this;
}
@Override
public String toString() {
return "ServerTransportConfig{" +
"port=" + port +
", idleSeconds=" + idleSeconds +
'}';
... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\cluster\config\ServerTransportConfig.java | 2 |
请完成以下Spring Boot application配置 | # In tests we have to disable the embedded ldap as it has issues when booting multiple contexts
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.ldap.embedded.EmbeddedLd | apAutoConfiguration
flowable.process-definition-location-prefix=classpath*:/none/ | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-samples\flowable-spring-boot-sample-ldap\src\main\resources\application-test.properties | 2 |
请完成以下Java代码 | public void setMSV3_BestellSupportId (int MSV3_BestellSupportId)
{
set_Value (COLUMNNAME_MSV3_BestellSupportId, Integer.valueOf(MSV3_BestellSupportId));
}
/** Get BestellSupportId.
@return BestellSupportId */
@Override
public int getMSV3_BestellSupportId ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M... | }
/** Set Id.
@param MSV3_Id Id */
@Override
public void setMSV3_Id (java.lang.String MSV3_Id)
{
set_Value (COLUMNNAME_MSV3_Id, MSV3_Id);
}
/** Get Id.
@return Id */
@Override
public java.lang.String getMSV3_Id ()
{
return (java.lang.String)get_Value(COLUMNNAME_MSV3_Id);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_Bestellung.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class PathPatternMessageMatcherBuilderFactoryBean
implements FactoryBean<PathPatternMessageMatcher.Builder> {
private PathPatternParser parser;
/**
* Create {@link PathPatternMessageMatcher}s using
* {@link PathPatternParser#defaultInstance}
*/
public PathPatternMessageMatcherBuilderFactoryBea... | public PathPatternMessageMatcherBuilderFactoryBean(PathPatternParser parser) {
this.parser = parser;
}
@Override
public PathPatternMessageMatcher.Builder getObject() throws Exception {
if (this.parser == null) {
return PathPatternMessageMatcher.withDefaults();
}
return PathPatternMessageMatcher.withPathP... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\web\messaging\PathPatternMessageMatcherBuilderFactoryBean.java | 2 |
请完成以下Java代码 | public String getColumnNameNotFQ()
{
return I_C_ValidCombination.COLUMNNAME_C_ValidCombination_ID;
} // getColumnName
/**
* Return data as sorted Array. Used in Web Interface
*
* @param mandatory mandatory
* @param onlyValidated only valid
* @param onlyActive only active
* @param temporary force lo... | .list(MAccount.class);
for (final I_C_ValidCombination account : accounts)
{
list.add(new KeyNamePair(account.getC_ValidCombination_ID(), account.getCombination() + " - " + account.getDescription()));
}
// Sort & return
return list;
} // getData
public int getC_ValidCombination_ID()
{
return C_Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAccountLookup.java | 1 |
请完成以下Java代码 | public class DebugRequestInterceptor implements ConnectorRequestInterceptor {
protected Object response;
protected boolean proceed;
private ConnectorRequest<?> request;
private Object target;
public DebugRequestInterceptor() {
this(true);
}
public DebugRequestInterceptor(boolean proceed) {
thi... | public void setProceed(boolean proceed) {
this.proceed = proceed;
}
public boolean isProceed() {
return proceed;
}
public void setResponse(Object response) {
this.response = response;
}
@SuppressWarnings("unchecked")
public <T> T getResponse() {
return (T) response;
}
@SuppressWarn... | repos\camunda-bpm-platform-master\connect\core\src\main\java\org\camunda\connect\impl\DebugRequestInterceptor.java | 1 |
请完成以下Java代码 | public void addNamespace(String prefix, String uri) {
namespaceMap.put(prefix, uri);
}
public boolean containsNamespacePrefix(String prefix) {
return namespaceMap.containsKey(prefix);
}
public String getNamespace(String prefix) {
return namespaceMap.get(prefix);
}
public ... | if (attribute != null && StringUtils.isNotEmpty(attribute.getName())) {
List<ExtensionAttribute> attributeList = null;
if (!this.definitionsAttributes.containsKey(attribute.getName())) {
attributeList = new ArrayList<>();
this.definitionsAttributes.put(attribute.g... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CmmnModel.java | 1 |
请完成以下Java代码 | public void addLabelGraphicInfoByDiagramId(String diagramId, String key, GraphicInfo graphicInfo) {
labelLocationByDiagramIdMap.computeIfAbsent(diagramId, k -> new LinkedHashMap<>());
labelLocationByDiagramIdMap.get(diagramId).put(key, graphicInfo);
labelLocationMap.put(key, graphicInfo);
}
... | public void setExporter(String exporter) {
this.exporter = exporter;
}
public String getExporterVersion() {
return exporterVersion;
}
public void setExporterVersion(String exporterVersion) {
this.exporterVersion = exporterVersion;
}
public Map<String, String> getNamespac... | repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\DmnDefinition.java | 1 |
请完成以下Java代码 | public List<FormDefinition> execute(CommandContext commandContext) {
CaseDefinition caseDefinition = CaseDefinitionUtil.getCaseDefinition(caseDefinitionId);
if (caseDefinition == null) {
throw new FlowableObjectNotFoundException("Cannot find case definition for id: " + caseDefinitio... | protected void addFormDefinitionToCollection(List<FormDefinition> formDefinitions, String formKey, CaseDefinition caseDefinition) {
FormDefinitionQuery formDefinitionQuery = formRepositoryService.createFormDefinitionQuery().formDefinitionKey(formKey);
CmmnDeployment deployment = CommandContextUtil.getCm... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\GetFormDefinitionsForCaseDefinitionCmd.java | 1 |
请完成以下Java代码 | public void onCompleted() {
logger.info("Finished getBidirectionalCommodityPriceLists");
finishLatch.countDown();
}
@Override
public void onError(Throwable t) {
logger.error("getBidirectionalCommodityPriceLists Failed:" + Status.fromTh... | if (args.length > 0) {
target = args[0];
}
ManagedChannel channel = ManagedChannelBuilder.forTarget(target)
.usePlaintext()
.build();
try {
CommodityClient client = new CommodityClient(channel);
client.getBidirectionalCommodityPriceLi... | repos\tutorials-master\grpc\src\main\java\com\baeldung\grpc\errorhandling\CommodityClient.java | 1 |
请完成以下Java代码 | public void setEMail_From (final @Nullable java.lang.String EMail_From)
{
set_ValueNoCheck (COLUMNNAME_EMail_From, EMail_From);
}
@Override
public java.lang.String getEMail_From()
{
return get_ValueAsString(COLUMNNAME_EMail_From);
}
@Override
public void setEMail_To (final @Nullable java.lang.String EMai... | * Status AD_Reference_ID=542015
* Reference name: OutboundLogLineStatus
*/
public static final int STATUS_AD_Reference_ID=542015;
/** Print_Success = Print_Success */
public static final String STATUS_Print_Success = "Print_Success";
/** Print_Failure = Print_Failure */
public static final String STATUS_Print_... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java-gen\de\metas\document\archive\model\X_C_Doc_Outbound_Log_Line.java | 1 |
请完成以下Java代码 | public String getPropertyName() {
return propertyName;
}
public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}
public Object getOrgValue() {
return orgValue;
}
public void setOrgValue(Object orgValue) {
this.orgValue = orgValue;
}
public Object getNew... | public String getOrgValueString() {
return valueAsString(orgValue);
}
protected String valueAsString(Object value) {
if(value == null) {
return null;
} else if(value instanceof Date){
return String.valueOf(((Date)value).getTime());
} else {
return value.toString();
}
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\PropertyChange.java | 1 |
请完成以下Java代码 | public static DeserializationException byteArrayToDeserializationException(LogAccessor logger, Header header) {
if (header != null && !(header instanceof DeserializationExceptionHeader)) {
throw new IllegalStateException("Foreign deserialization exception header ignored; possible attack?");
}
try {
ObjectI... | "Header does not contain a DeserializationException");
}
return super.resolveClass(desc);
}
};
return (DeserializationException) ois.readObject();
}
catch (IOException | ClassNotFoundException | ClassCastException e) {
logger.error(e, "Failed to deserialize a deserialization exception");
... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\SerializationUtils.java | 1 |
请完成以下Java代码 | public String getCreateUserId() {
return createUserId;
}
public void setCreateUserId(String createUserId) {
this.createUserId = createUserId;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEnd... | public Object getPersistentState() {
Map<String, Object> persistentState = new HashMap<String, Object>();
persistentState.put("endTime", endTime);
persistentState.put("executionStartTime", executionStartTime);
return persistentState;
}
public void delete() {
HistoricIncidentManager historicInci... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DmnEngineConfigurationBuilder elProvider(ElProvider elProvider) {
this.elProvider = elProvider;
return this;
}
public DmnEngineConfigurationBuilder feelCustomFunctionProviders(List<FeelCustomFunctionProvider> feelCustomFunctionProviders) {
this.feelCustomFunctionProviders = feelCustomFunctionPr... | }
protected List<DmnDecisionEvaluationListener> createCustomPostDecisionEvaluationListeners() {
ensureNotNull("dmnHistoryEventProducer", dmnHistoryEventProducer);
// note that the history level may be null - see CAM-5165
HistoryDecisionEvaluationListener historyDecisionEvaluationListener = new HistoryDe... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\configuration\DmnEngineConfigurationBuilder.java | 2 |
请完成以下Java代码 | public void setIsSelfService (boolean IsSelfService)
{
set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService));
}
/** Get Self-Service.
@return This is a Self-Service entry or this entry can be changed via Self-Service
*/
public boolean isSelfService ()
{
Object oo = get_Value(COLUMNNAME_Is... | */
public void setR_Category_ID (int R_Category_ID)
{
if (R_Category_ID < 1)
set_ValueNoCheck (COLUMNNAME_R_Category_ID, null);
else
set_ValueNoCheck (COLUMNNAME_R_Category_ID, Integer.valueOf(R_Category_ID));
}
/** Get Category.
@return Request Category
*/
public int getR_Category_ID ()
{
In... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_CategoryUpdates.java | 1 |
请完成以下Java代码 | public class SAP_GLJournal_CopyDocument extends JavaProcess implements IProcessPrecondition
{
private final static AdMessageKey DOCUMENT_MUST_BE_COMPLETED_MSG = AdMessageKey.of("gljournal_sap.Document_has_to_be_Completed");
private final SAPGLJournalService glJournalService = SpringContextHolder.instance.getBean(SAP... | @Override
protected String doIt()
{
final SAPGLJournal createdJournal = glJournalService.copy(SAPGLJournalCopyRequest.builder()
.sourceJournalId(SAPGLJournalId.ofRepoId(getRecord_ID()))
.dateDoc(dateDoc)
.negateAmounts(negateAmounts)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\process\SAP_GLJournal_CopyDocument.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MyReactiveCloudFoundryConfiguration {
@Bean
public HttpHandler httpHandler(ApplicationContext applicationContext, WebFluxProperties properties) {
HttpHandler httpHandler = WebHttpHandlerBuilder.applicationContext(applicationContext).build();
return new CloudFoundryHttpHandler(properties.getBasePath(... | @Override
public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response) {
// Remove underlying context path first (e.g. Servlet container)
String path = request.getPath().pathWithinApplication().value();
if (path.startsWith("/cloudfoundryapplication")) {
return this.delegate.handle(req... | repos\spring-boot-4.0.1\documentation\spring-boot-docs\src\main\java\org\springframework\boot\docs\actuator\cloudfoundry\customcontextpath\MyReactiveCloudFoundryConfiguration.java | 2 |
请完成以下Spring Boot application配置 | # Spring boot application
spring.application.name=dubbo-registry-nacos-provider-sample
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
dubbo.scan.base-packages=org.apache.dubbo.spring.boot.sample.provider.service
# Dubbo Application
## The default value of dubbo.application.name is... | ## Random port
dubbo.protocol.port=-1
## Dubbo Registry
dubbo.registry.address=nacos://${nacos.server-address}:${nacos.port}/?username=${nacos.username}&password=${nacos.password}
## DemoService version
demo.service.version=1.0.0 | repos\dubbo-spring-boot-project-master\dubbo-spring-boot-samples\registry-samples\nacos-samples\provider-sample\src\main\resources\application.properties | 2 |
请完成以下Java代码 | protected TaskEntity updateTaskComment(String taskId, CommandContext commandContext, CommentEntity comment) {
TaskEntity task = commandContext.getTaskManager().findTaskById(taskId);
ensureNotNull("No task exists with taskId: " + taskId, "task", task);
checkTaskWork(task, commandContext);
updateComment(... | checker.checkUpdateProcessInstanceById(processInstanceId);
}
}
private void updateComment(CommandContext commandContext, CommentEntity comment) {
String eventMessage = comment.toEventMessage(message);
String userId = commandContext.getAuthenticatedUserId();
comment.setMessage(eventMessage);
c... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\UpdateCommentCmd.java | 1 |
请完成以下Java代码 | public int getCompletionQuantity() {
return completionQuantityAttribute.getValue(this);
}
public void setCompletionQuantity(int completionQuantity) {
completionQuantityAttribute.setValue(this, completionQuantity);
}
public SequenceFlow getDefault() {
return defaultAttribute.getReferenceTargetEleme... | public Collection<Property> getProperties() {
return propertyCollection.get(this);
}
public Collection<DataInputAssociation> getDataInputAssociations() {
return dataInputAssociationCollection.get(this);
}
public Collection<DataOutputAssociation> getDataOutputAssociations() {
return dataOutputAssoc... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ActivityImpl.java | 1 |
请完成以下Java代码 | protected MigrationInstructionValidationReportImpl validateInstruction(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, List<MigrationInstructionValidator> migrationInstructionValidators) {
MigrationInstructionValidationReportImpl validationReport = new MigrationInstructionV... | else {
if (sourceActivityId == null) {
instructionReport.addFailure("Source activity id is null");
}
if (targetActivityId == null) {
instructionReport.addFailure("Target activity id is null");
}
}
if (instructionReport.hasFailures()) {
planReport.... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\CreateMigrationPlanCmd.java | 1 |
请完成以下Java代码 | public void setParameterName(String parameterName) {
Assert.hasLength(parameterName, "parameterName can't be null");
this.parameterName = parameterName;
}
/**
* Sets the header name
* @param headerName The header name
*/
public void setHeaderName(String headerName) {
Assert.hasLength(headerName, "header... | return createCsrfToken(createNewToken());
}
private CsrfToken createCsrfToken(String tokenValue) {
return new DefaultCsrfToken(this.headerName, this.parameterName, tokenValue);
}
private String createNewToken() {
return UUID.randomUUID().toString();
}
private String getRequestContext(ServerHttpRequest requ... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\csrf\CookieServerCsrfTokenRepository.java | 1 |
请完成以下Java代码 | public void setAuthor(Author author) {
this.author = author;
}
@PreRemove
private void bookRemove() {
deleted = true;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (getClass() != obj.getClass()) {
... | return id != null && id.equals(((Book) obj).id);
}
@Override
public int hashCode() {
return 2021;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", title=" + title + ", isbn=" + isbn + '}';
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootSoftDeletes\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public FilterQuery filterId(String filterId) {
ensureNotNull("filterId", filterId);
this.filterId = filterId;
return this;
}
public FilterQuery filterResourceType(String resourceType) {
ensureNotNull("resourceType", resourceType);
this.resourceType = resourceType;
return this;
}
public... | public FilterQuery orderByFilterId() {
return orderBy(FilterQueryProperty.FILTER_ID);
}
public FilterQuery orderByFilterResourceType() {
return orderBy(FilterQueryProperty.RESOURCE_TYPE);
}
public FilterQuery orderByFilterName() {
return orderBy(FilterQueryProperty.NAME);
}
public FilterQuery... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\filter\FilterQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ListLineItemExtensionType {
@XmlElement(name = "ListLineItemExtension", namespace = "http://erpel.at/schemas/1p0/documents/extensions/edifact")
protected at.erpel.schemas._1p0.documents.extensions.edifact.ListLineItemExtensionType listLineItemExtension;
@XmlElement(name = "ErpelListLineItemExt... | }
/**
* Gets the value of the erpelListLineItemExtension property.
*
* @return
* possible object is
* {@link CustomType }
*
*/
public CustomType getErpelListLineItemExtension() {
return erpelListLineItemExtension;
}
/**
* Sets the value of ... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\ListLineItemExtensionType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ReceiptRestController
{
private static final Logger log = LogManager.getLogger(ReceiptRestController.class);
private final ITrxManager trxManager = Services.get(ITrxManager.class);
private final ReceiptService receiptService;
private final CustomerReturnRestService customerReturnRestService;
public... | final List<InOutId> createdReturnIds = jsonCreateReceiptsRequest.getJsonCreateCustomerReturnInfoList().isEmpty()
? ImmutableList.of()
: customerReturnRestService.handleReturns(jsonCreateReceiptsRequest.getJsonCreateCustomerReturnInfoList());
return toJsonCreateReceiptsResponse(createdReceiptIds, createdRetur... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\receipt\ReceiptRestController.java | 2 |
请完成以下Spring Boot application配置 | web3j.client-address=http://localhost:8545
lottery.contract.owner-address=0x9b418710ce8438e5fe585b519e8d709e1ea77aca
lottery.contract.gas-price=1
lottery.contract.gas-limit= | 2000000
lottery.contract.address=0x1c0fe20304e76882fe7ce7bb3e2e63dc92ce64de | repos\springboot-demo-master\Blockchain\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public class GreetingRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final CCache<Integer, GreetingsMap> cache = CCache.<Integer, GreetingsMap>builder()
.tableName(I_C_Greeting.Table_Name)
.build();
public Greeting getById(@NonNull final GreetingId id)
{
return getGreet... | .build();
}
public Greeting createGreeting(@NonNull final CreateGreetingRequest request)
{
final I_C_Greeting record = InterfaceWrapperHelper.newInstance(I_C_Greeting.class);
record.setName(request.getName());
record.setGreeting(request.getGreeting());
record.setGreetingStandardType(GreetingStandardType.toC... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\greeting\GreetingRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setStreamMessageConverter(@Nullable StreamMessageConverter streamMessageConverter) {
this.streamMessageConverter = streamMessageConverter;
}
/**
* Set the {@link ProducerCustomizer} instances to use.
* @param producerCustomizer the producer customizer
*/
public void setProducerCustomizer(@Nullab... | * @param template the {@link RabbitStreamTemplate} instance to configure
*/
public void configure(RabbitStreamTemplate template) {
if (this.messageConverter != null) {
template.setMessageConverter(this.messageConverter);
}
if (this.streamMessageConverter != null) {
template.setStreamConverter(this.stream... | repos\spring-boot-4.0.1\module\spring-boot-amqp\src\main\java\org\springframework\boot\amqp\autoconfigure\RabbitStreamTemplateConfigurer.java | 2 |
请完成以下Java代码 | public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
@Override
public Date getExecutionStartTime() {
... | public void delete() {
HistoricIncidentManager historicIncidentManager = Context.getCommandContext().getHistoricIncidentManager();
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(seedJobDefinitionId);
historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(monitorJobDefinitionId);
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchEntity.java | 1 |
请完成以下Java代码 | protected void deleteAttachments(Map<String, Object> parameters) {
getDbEntityManager().deletePreserveOrder(ByteArrayEntity.class, "deleteAttachmentByteArraysByIds", parameters);
getDbEntityManager().deletePreserveOrder(AttachmentEntity.class, "deleteAttachmentByIds", parameters);
}
public Attachment findA... | public DbOperation deleteAttachmentsByRemovalTime(Date removalTime, int minuteFrom, int minuteTo, int batchSize) {
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("removalTime", removalTime);
if (minuteTo - minuteFrom + 1 < 60) {
parameters.put("minuteFrom", minuteFrom);... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AttachmentManager.java | 1 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:h2:~/test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.properties.hibernate.format_sq | l=true
spring.batch.jdbc.initialize-schema=always
spring.sql.init.mode=always
spring.batch.jdbc.table-prefix=BATCH_ | repos\tutorials-master\spring-batch-2\src\main\resources\application-restart.properties | 2 |
请完成以下Java代码 | private Map<String, Object> resolveExecutionExpressions(
MappingExecutionContext mappingExecutionContext,
Map<String, Object> availableVariables,
Map<String, Object> outboundVariables
) {
if (availableVariables != null && !availableVariables.isEmpty()) {
return expression... | new VariableScopeExpressionEvaluator(mappingExecutionContext.getExecution()),
outboundVariables
);
}
private boolean isTargetProcessVariableDefined(
Extension extensions,
DelegateExecution execution,
String variableName
) {
return (
extensions... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\impl\ExtensionsVariablesMappingProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ApplicationConfiguration implements WebMvcConfigurer {
@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
configurer.enable();
}
@Bean
public ResourceBundleMessageSource resourceBundleMessageSource() {
ResourceBundleMess... | return bean;
}
@Bean
public InternalResourceViewResolver htmlViewResolver() {
InternalResourceViewResolver bean = new InternalResourceViewResolver();
bean.setPrefix("/WEB-INF/html/");
bean.setSuffix(".html");
bean.setOrder(2);
return bean;
}
@Bean
public... | repos\tutorials-master\spring-web-modules\spring-mvc-forms-jsp\src\main\java\com\baeldung\springmvcforms\configuration\ApplicationConfiguration.java | 2 |
请完成以下Java代码 | public java.lang.String getDescription()
{
return get_ValueAsString(COLUMNNAME_Description);
}
@Override
public void setDocument_Currency_ID (final int Document_Currency_ID)
{
if (Document_Currency_ID < 1)
set_Value (COLUMNNAME_Document_Currency_ID, null);
else
set_Value (COLUMNNAME_Document_Curren... | /**
* PostingSign AD_Reference_ID=541699
* Reference name: PostingSign
*/
public static final int POSTINGSIGN_AD_Reference_ID=541699;
/** DR = D */
public static final String POSTINGSIGN_DR = "D";
/** CR = C */
public static final String POSTINGSIGN_CR = "C";
@Override
public void setPostingSign (final jav... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_UserChange.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getParentActivityInstanceId() {
return parentActivityInstanceId;
}
public void setParentActivityInstanceId(String parentActivityInstanceId) {
this.parentActivityInstanceId = parentActivityInstan... | public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
+ ", parentActivityInstanceId=" + parentActivityInstanceId
+ ", pro... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ProcessElementInstanceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int hashCode() {
return Objects.hash(gender, title, name, address, postalCode, city);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PatientBillingAddress {\n");
sb.append(" gender: ").append(toIndentedString(gender)).append("\n");
... | sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\PatientBillingAddress.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getPassword(String name) {
try {
SimpleCredentialName credentialName = new SimpleCredentialName(name);
return credentialOperations.getByName(credentialName, PasswordCredential.class)
.getValue()
.getPassword();
} catch (Exception e) {
... | .build();
CredentialPermission credentialPermission = permissionOperations.addPermissions(credentialName, permission);
return credentialPermission;
} catch (Exception e) {
return null;
}
}
public CredentialPermission getCredentialPermission(String name) {
... | repos\tutorials-master\spring-credhub\src\main\java\com\baeldung\service\CredentialService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ProcessExtensionRepositoryImpl implements ProcessExtensionRepository {
private final DeploymentResourceLoader<ProcessExtensionModel> processExtensionLoader;
private final ProcessExtensionResourceReader processExtensionReader;
private final RepositoryService repositoryService;
public Proce... | );
return processExtensionModelMap.get(processDefinition.getKey());
}
private Map<String, Extension> getProcessExtensionsForDeploymentId(String deploymentId) {
List<ProcessExtensionModel> processExtensionModels = processExtensionLoader.loadResourcesForDeployment(
deploymentId,
... | repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\ProcessExtensionRepositoryImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Amount getShippingCost()
{
return shippingCost;
}
public void setShippingCost(Amount shippingCost)
{
this.shippingCost = shippingCost;
}
public DeliveryCost shippingIntermediationFee(Amount shippingIntermediationFee)
{
this.shippingIntermediationFee = shippingIntermediationFee;
return this;
}
... | }
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class DeliveryCost {\n");
sb.append(" importCharges: ").append(toIndentedString(importCharges)).append("\n");
sb.append(" shippingCost: ").append(toIndentedString(shippingCost)).append("\n");
sb.append(" shi... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\DeliveryCost.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Golfer updateScore(@NonNull Function<Integer, Integer> scoreFunction, @NonNull Golfer player) {
player.setScore(scoreFunction.apply(player.getScore()));
this.golferService.update(player);
return player;
}
private int calculateFinalScore(@Nullable Integer scoreRelativeToPar) {
int finalScore = sco... | scoreDelta *= this.random.nextBoolean() ? -1 : 1;
return runningScore + scoreDelta;
}
private void finish(@NonNull GolfTournament golfTournament) {
for (GolfTournament.Pairing pairing : golfTournament) {
if (pairing.signScorecard()) {
updateScore(this::calculateFinalScore, pairing.getPlayerOne());
u... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline-async\src\main\java\example\app\caching\inline\async\client\service\PgaTourService.java | 2 |
请完成以下Java代码 | public java.lang.String getM_HU_PackagingCode_Text()
{
return get_ValueAsString(COLUMNNAME_M_HU_PackagingCode_Text);
}
@Override
public org.compiere.model.I_M_InOut getM_InOut()
{
return get_ValueAsPO(COLUMNNAME_M_InOut_ID, org.compiere.model.I_M_InOut.class);
}
@Override
public void setM_InOut(final org... | @Override
public int getM_InOut_ID()
{
return get_ValueAsInt(COLUMNNAME_M_InOut_ID);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_Desadv_Pack.java | 1 |
请完成以下Java代码 | public class StoppingExecution {
private static final Logger LOG = LoggerFactory.getLogger(StoppingExecution.class);
public static void main(String[] args) {
StoppingExecution.testUsingLoop();
StoppingExecution.testUsingTimer();
StoppingExecution.testUsingFuture();
StoppingExec... | LOG.info("future get with 7 seconds timeout");
future.get(7, TimeUnit.SECONDS);
} catch (TimeoutException e) {
LOG.info("future timeout");
future.cancel(true);
} catch (Exception e) {
LOG.info("future exception", e);
} finally {
executo... | repos\tutorials-master\core-java-modules\core-java-concurrency-basic-2\src\main\java\com\baeldung\concurrent\stopexecution\StoppingExecution.java | 1 |
请完成以下Java代码 | public void setProcessInstance(ExecutionEntity processInstance) {
this.processInstance = processInstance;
this.processInstanceId = processInstance.getId();
}
public ProcessDefinitionEntity getProcessDef() {
if ((processDef == null) && (processDefId != null)) {
this.processDe... | @Override
public String getScopeDefinitionId() {
return null;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("IdentityLinkEntity[id=").append(id);
sb.append(", type=").append(type);
if (userId != null) {
sb.ap... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\IdentityLinkEntity.java | 1 |
请完成以下Java代码 | private Properties getActualContext()
{
//
// IMPORTANT: this method will be called very often, so please make sure it's FAST!
//
//
// If there is currently a temporary context active, return it first
final Properties temporaryCtx = temporaryCtxHolder.get();
if (temporaryCtx != null)
{
logger.trac... | {
private boolean closed = false;
@Override
public void close()
{
if (closed)
{
return;
}
if (previousTempCtx != null)
{
temporaryCtxHolder.set(previousTempCtx);
}
else
{
temporaryCtxHolder.remove();
}
closed = true;
logger.trace("Switched back ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\session\WebRestApiContextProvider.java | 1 |
请完成以下Java代码 | protected Stream<HUEditorRow> streamSelectedRows()
{
final DocumentIdsSelection selectedRowIds = getSelectedRowIds();
return getView().streamByIds(selectedRowIds);
}
protected final Stream<HuId> streamSelectedHUIds(@NonNull final Select select)
{
return streamSelectedHUIds(HUEditorRowFilter.select(select));
... | }
protected final Stream<I_M_HU> streamSelectedHUs(@NonNull final HUEditorRowFilter filter)
{
final Stream<HuId> huIds = streamSelectedHUIds(filter);
return StreamUtils
.dice(huIds, 100)
.flatMap(huIdsChunk -> handlingUnitsRepo.getByIds(huIdsChunk).stream());
}
protected final void addHUIdsAndInvalida... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorProcessTemplate.java | 1 |
请完成以下Java代码 | public class SecuredAnnotationSecurityMetadataSource extends AbstractFallbackMethodSecurityMetadataSource {
private AnnotationMetadataExtractor annotationExtractor;
private @Nullable Class<? extends Annotation> annotationType;
public SecuredAnnotationSecurityMetadataSource() {
this(new SecuredAnnotationMetadata... | }
private @Nullable Collection<ConfigAttribute> processAnnotation(@Nullable Annotation annotation) {
return (annotation != null) ? this.annotationExtractor.extractAttributes(annotation) : null;
}
static class SecuredAnnotationMetadataExtractor implements AnnotationMetadataExtractor<Secured> {
@Override
publ... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\annotation\SecuredAnnotationSecurityMetadataSource.java | 1 |
请完成以下Java代码 | public final class LoggingHelper
{
public static void log(final Logger logger, final Level level, final String msg, final Throwable t)
{
if (logger == null)
{
System.err.println(msg);
if (t != null)
{
t.printStackTrace(System.err);
}
}
else if (level == Level.ERROR)
{
logger.error(msg, t)... | {
System.err.println(msg + " -- " + (msgParameters == null ? "" : Arrays.asList(msgParameters)));
}
else if (level == Level.ERROR)
{
logger.error(msg, msgParameters);
}
else if (level == Level.WARN)
{
logger.warn(msg, msgParameters);
}
else if (level == Level.INFO)
{
logger.info(msg, msgPa... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\logging\LoggingHelper.java | 1 |
请完成以下Java代码 | public abstract class BaseVersionedEntity<D extends BaseData & HasVersion> extends BaseSqlEntity<D> implements HasVersion {
@Getter @Setter
@Version
@Column(name = ModelConstants.VERSION_PROPERTY)
protected Long version;
public BaseVersionedEntity() {
super();
}
public BaseVersion... | public BaseVersionedEntity(BaseVersionedEntity<?> entity) {
super(entity);
this.version = entity.version;
}
@Override
public String toString() {
return "BaseVersionedEntity{" +
"id=" + id +
", createdTime=" + createdTime +
", version="... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\BaseVersionedEntity.java | 1 |
请完成以下Java代码 | public String getSubject ()
{
return (String)get_Value(COLUMNNAME_Subject);
}
/** Set Mail Message.
@param W_MailMsg_ID
Web Store Mail Message Template
*/
public void setW_MailMsg_ID (int W_MailMsg_ID)
{
if (W_MailMsg_ID < 1)
set_ValueNoCheck (COLUMNNAME_W_MailMsg_ID, null);
else
set_ValueN... | {
if (W_Store_ID < 1)
set_Value (COLUMNNAME_W_Store_ID, null);
else
set_Value (COLUMNNAME_W_Store_ID, Integer.valueOf(W_Store_ID));
}
/** Get Web Store.
@return A Web Store of the Client
*/
public int getW_Store_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_W_Store_ID);
if (ii == null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_MailMsg.java | 1 |
请完成以下Java代码 | public Optional<WarehouseId> getWarehouseDest(final IContext context)
{
final I_M_AttributeSetInstance asi = context.getM_AttributeSetInstance();
if (asi == null || asi.getM_AttributeSetInstance_ID() <= 0)
{
return Optional.empty();
}
final IAttributeDAO attributeDAO = Services.get(IAttributeDAO.class);
... | }
final String qualityInspectionCycleValue = qualityInspectionCycleAttributeInstance.getValue();
if (Check.isEmpty(qualityInspectionCycleValue, true))
{
return Optional.empty();
}
final String sysconfigName = SYSCONFIG_QualityInspectionWarehouseDest_Prefix
+ "." + context.getM_Warehouse_ID()
+ ".... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\materialtracking\impl\QualityInspectionWarehouseDestProvider.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.