instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public synchronized ApplicationServerImpl getApplicationServer() {
if (applicationServer == null) {
applicationServer = PlatformDiagnosticsRegistry.getApplicationServer();
}
return applicationServer;
}
public synchronized void setApplicationServer(String applicationServerVersion) {
this.appli... | public void markOccurrence(String name, long times) {
CommandCounter counter = commands.get(name);
if (counter == null) {
synchronized (commands) {
if (counter == null) {
counter = new CommandCounter(name);
commands.put(name, counter);
}
}
}
counter.mark(... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\diagnostics\DiagnosticsRegistry.java | 1 |
请完成以下Java代码 | protected void invalidateDeviceProfileCache(DeviceId deviceId, String deviceJson) {
DeviceState deviceState = deviceStates.get(deviceId);
if (deviceState != null) {
DeviceProfileId currentProfileId = deviceState.getProfileId();
try {
Device device = JacksonUtil.fr... | }
@Override
public TbPair<Boolean, JsonNode> upgrade(int fromVersion, JsonNode oldConfiguration) throws TbNodeException {
boolean hasChanges = false;
switch (fromVersion) {
case 0:
String persistAlarmRulesState = "persistAlarmRulesState";
String fetch... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\profile\TbDeviceProfileNode.java | 1 |
请完成以下Java代码 | public java.lang.String getPostal()
{
return get_ValueAsString(COLUMNNAME_Postal);
}
/**
* TerminationReason AD_Reference_ID=540761
* Reference name: Contracts_TerminationaReason
*/
public static final int TERMINATIONREASON_AD_Reference_ID=540761;
/** HighAge = Hi */
public static final String TERMINAT... | /** LimitedDelivery = Ld */
public static final String TERMINATIONREASON_LimitedDelivery = "Ld";
/** PrivateReasons = Pr */
public static final String TERMINATIONREASON_PrivateReasons = "Pr";
/** CanNotRead = Cnr */
public static final String TERMINATIONREASON_CanNotRead = "Cnr";
/** NotReachable = Nr */
public ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Export.java | 1 |
请完成以下Java代码 | public void showError(final String title, final Throwable ex)
{
final String message = buildErrorMessage(ex);
JOptionPane.showMessageDialog(parent, message, title, JOptionPane.ERROR_MESSAGE);
if (log.isLoggable(Level.FINE))
{
log.log(Level.FINE, title + " - " + message, ex);
}
}
private String buildEr... | final Throwable cause = ex.getCause();
if (cause != null)
{
if (msg.length() > 0)
{
msg.append(": ");
}
msg.append(cause.toString());
}
return msg.toString();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\ui\SwingUserInterface.java | 1 |
请完成以下Java代码 | public StatsTimer createStatsTimer(String type, String name, String... tags) {
return new StatsTimer(name, Timer.builder(type)
.tags(getTags(name, tags))
.register(meterRegistry));
}
private static String[] getTags(String statsName, String[] otherTags) {
String[]... | @Override
public void increment(double amount) {
}
@Override
public double count() {
return 0;
}
@Override
public Id getId() {
return null;
}
}
} | repos\thingsboard-master\common\stats\src\main\java\org\thingsboard\server\common\stats\DefaultStatsFactory.java | 1 |
请完成以下Java代码 | public Boolean getWithoutTenantId() {
return withoutTenantId;
}
@CamundaQueryParam(value = "withoutTenantId", converter = BooleanConverter.class)
public void setWithoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = withoutTenantId;
}
public Boolean getIncludeEventSubscriptionsWithoutTena... | }
if (executionId != null) {
query.executionId(executionId);
}
if (processInstanceId != null) {
query.processInstanceId(processInstanceId);
}
if (activityId != null) {
query.activityId(activityId);
}
if (tenantIdIn != null && !tenantIdIn.isEmpty()) {
query.tenantIdIn(... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\EventSubscriptionQueryDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public EngineRestVariable createRestVariable(String name, Object value, boolean includeBinaryValue) {
return createRestVariable(name, value, includeBinaryValue, createUrlBuilder());
}
public EngineRestVariable createRestVariable(String name, Object value, boolean includeBinaryValue, DmnRestUrlBuilder u... | protected void initializeVariableConverters() {
variableConverters.add(new StringRestVariableConverter());
variableConverters.add(new IntegerRestVariableConverter());
variableConverters.add(new LongRestVariableConverter());
variableConverters.add(new ShortRestVariableConverter());
... | repos\flowable-engine-main\modules\flowable-dmn-rest\src\main\java\org\flowable\dmn\rest\service\api\DmnRestResponseFactory.java | 2 |
请完成以下Java代码 | private static void addToken(final String newToken, final StringBuilder sb)
{
if (!Check.isEmpty(newToken))
{
final String s = sb.toString();
if (!s.endsWith("\n") && !s.endsWith(" ") && !s.isEmpty())
{
sb.append(" ");
}
sb.append(newToken);
}
}
private static final Pattern PATTERN_BRACKET... | return bracketsTxt;
}
private AddressDisplaySequence getDisplaySequence(@NonNull final I_C_Country country, final boolean isLocalAddress)
{
final CountryId countryId = CountryId.ofRepoId(country.getC_Country_ID());
final CountrySequences countrySequence = countriesRepo
.getCountrySequences(countryId, getOrg... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impl\AddressBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public User signUp(UserSignUpRequest request) {
final var encodedPassword = Password.of(request.getRawPassword(), passwordEncoder);
return userRepository.save(User.of(request.getEmail(),
request.getUserName(),
encodedPassword));
}
@Transactional(readOnly = true)
... | @Transactional
public User updateUser(long id, UserUpdateRequest request) {
final var user = userRepository.findById(id).orElseThrow(NoSuchElementException::new);
request.getEmailToUpdate()
.ifPresent(user::changeEmail);
request.getUserNameToUpdate()
.ifPresen... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\UserService.java | 2 |
请完成以下Java代码 | public java.lang.String getSuchname ()
{
return (java.lang.String)get_Value(COLUMNNAME_Suchname);
}
/** Set Titel.
@param Title
Bezeichnung für diesen Eintrag
*/
@Override
public void setTitle (final java.lang.String Title)
{
set_ValueNoCheck (COLUMNNAME_Title, Title);
}
/** Get Titel.
@return Be... | /** Get V_BPartnerCockpit_ID.
@return V_BPartnerCockpit_ID */
@Override
public int getV_BPartnerCockpit_ID ()
{
final Integer ii = (Integer)get_Value(COLUMNNAME_V_BPartnerCockpit_ID);
if (ii == null)
{
return 0;
}
return ii.intValue();
}
/** Set Suchschlüssel.
@param value
Suchschlüssel für d... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\adempiere\model\X_V_BPartnerCockpit.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class SslBundleProperties {
/**
* Key details for the bundle.
*/
private final Key key = new Key();
/**
* Options for the SSL connection.
*/
private final Options options = new Options();
/**
* SSL Protocol to use.
*/
private String protocol = SslBundle.DEFAULT_PROTOCOL;
/**
* W... | return this.ciphers;
}
public void setCiphers(@Nullable Set<String> ciphers) {
this.ciphers = ciphers;
}
public @Nullable Set<String> getEnabledProtocols() {
return this.enabledProtocols;
}
public void setEnabledProtocols(@Nullable Set<String> enabledProtocols) {
this.enabledProtocols = enabledP... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ssl\SslBundleProperties.java | 2 |
请完成以下Java代码 | public class ResolveIncidentCmd implements Command<Void> {
protected String incidentId;
public ResolveIncidentCmd(String incidentId) {
EnsureUtil.ensureNotNull(BadUserRequestException.class, "", "incidentId", incidentId);
this.incidentId = incidentId;
}
@Override
public Void execute(CommandContext ... | }
EnsureUtil.ensureNotNull(BadUserRequestException.class, "", "executionId", incident.getExecutionId());
ExecutionEntity execution = commandContext.getExecutionManager().findExecutionById(incident.getExecutionId());
EnsureUtil.ensureNotNull(BadUserRequestException.class,
"Cannot find an execution ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\ResolveIncidentCmd.java | 1 |
请完成以下Java代码 | public boolean isValueChanged(final Object model, final String columnName)
{
return POJOWrapper.isValueChanged(model, columnName);
}
@Override
public boolean isValueChanged(final Object model, final Set<String> columnNames)
{
return POJOWrapper.isValueChanged(model, columnNames);
}
@Override
public boole... | }
@Override
public Object setDynAttribute(final Object model, final String attributeName, final Object value)
{
return POJOWrapper.setDynAttribute(model, attributeName, value);
}
@Override
public <T extends PO> T getPO(final Object model, final boolean strict)
{
throw new UnsupportedOperationException("Get... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POJOInterfaceWrapperHelper.java | 1 |
请完成以下Java代码 | public void setUrl(String url) {
this.url = url;
}
public String getFileType() {
return fileType;
}
public void setFileType(String fileType) {
this.fileType = fileType;
}
public String getStoreType() {
return storeType;
}
public void setStoreType(Strin... | public Double getFileSize() {
return fileSize;
}
public void setFileSize(Double fileSize) {
this.fileSize = fileSize;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
} | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysFilesModel.java | 1 |
请完成以下Java代码 | protected AttributeSetInstanceId getM_AttributeSetInstance(final I_C_AllocationLine documentLine)
{
// shall not be called because we implement "getMaterialTrackingFromDocumentLineASI"
throw new IllegalStateException("shall not be called");
}
/**
* Loads and returns the material tracking of the invoice refere... | final IMaterialTrackingDAO materialTrackingDAO = Services.get(IMaterialTrackingDAO.class);
final I_C_Invoice invoice = documentLine.getC_Invoice();
// please keep in sync with the isEligible method mentioned in the javadoc.
if (Services.get(IInvoiceBL.class).isReversal(invoice))
{
return null;
}
if (inv... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\C_AllocationHdr.java | 1 |
请完成以下Java代码 | private static Predicate<List<String>> containsAudience() {
return (audienceClaim) -> {
if (CollectionUtils.isEmpty(audienceClaim)) {
return false;
}
List<String> audienceList = getAudience();
for (String audience : audienceClaim) {
if (audienceList.contains(audience)) {
return true;
}
... | AuthorizationServerSettings authorizationServerSettings = authorizationServerContext
.getAuthorizationServerSettings();
List<String> audience = new ArrayList<>();
audience.add(authorizationServerContext.getIssuer());
audience.add(asUrl(authorizationServerContext.getIssuer(), authorizationServerSettings.getToke... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\JwtClientAssertionDecoderFactory.java | 1 |
请完成以下Java代码 | public void setWEBUI_KPI_Field_ID (final int WEBUI_KPI_Field_ID)
{
if (WEBUI_KPI_Field_ID < 1)
set_ValueNoCheck (COLUMNNAME_WEBUI_KPI_Field_ID, null);
else
set_ValueNoCheck (COLUMNNAME_WEBUI_KPI_Field_ID, WEBUI_KPI_Field_ID);
}
@Override
public int getWEBUI_KPI_Field_ID()
{
return get_ValueAsInt(CO... | {
set_ValueFromPO(COLUMNNAME_WEBUI_KPI_ID, de.metas.ui.web.base.model.I_WEBUI_KPI.class, WEBUI_KPI);
}
@Override
public void setWEBUI_KPI_ID (final int WEBUI_KPI_ID)
{
if (WEBUI_KPI_ID < 1)
set_ValueNoCheck (COLUMNNAME_WEBUI_KPI_ID, null);
else
set_ValueNoCheck (COLUMNNAME_WEBUI_KPI_ID, WEBUI_KPI_ID)... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_KPI_Field.java | 1 |
请完成以下Java代码 | public void setElapsedTimeMS (final BigDecimal ElapsedTimeMS)
{
set_Value (COLUMNNAME_ElapsedTimeMS, ElapsedTimeMS);
}
@Override
public BigDecimal getElapsedTimeMS()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_ElapsedTimeMS);
return bd != null ? bd : BigDecimal.ZERO;
}
/**
* EventType AD... | @Override
public void setTextMsg (final java.lang.String TextMsg)
{
set_Value (COLUMNNAME_TextMsg, TextMsg);
}
@Override
public java.lang.String getTextMsg()
{
return get_ValueAsString(COLUMNNAME_TextMsg);
}
/**
* WFState AD_Reference_ID=305
* Reference name: WF_Instance State
*/
public static fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_EventAudit.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public I_AD_InfoColumn retrieveTreeInfoColumn(final I_AD_InfoWindow infoWindow)
{
for (final I_AD_InfoColumn infoColumn : retrieveInfoColumns(infoWindow))
{
if (!infoColumn.isActive())
{
continue;
}
if (infoColumn.isTree())
{
return infoColumn;
}
}
return null;
}
@Override
public... | Collections.sort(list, new Comparator<I_AD_InfoColumn>()
{
@Override
public int compare(final I_AD_InfoColumn o1, final I_AD_InfoColumn o2)
{
return o1.getSeqNo() - o2.getSeqNo();
}
});
return list;
}
@Override
@Cached(cacheName = I_AD_InfoWindow.Table_Name + "#by#" + I_AD_InfoWindow.COLUMNNAM... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\service\impl\ADInfoWindowDAO.java | 2 |
请完成以下Java代码 | public org.compiere.model.I_M_Warehouse_PickingGroup getM_Warehouse_PickingGroup() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Warehouse_PickingGroup_ID, org.compiere.model.I_M_Warehouse_PickingGroup.class);
}
@Override
public void setM_Warehouse_PickingGroup(org.compiere.model.I_M_Warehouse_Pick... | set_Value (COLUMNNAME_M_Warehouse_PickingGroup_ID, null);
else
set_Value (COLUMNNAME_M_Warehouse_PickingGroup_ID, Integer.valueOf(M_Warehouse_PickingGroup_ID));
}
/** Get Kommissionier-Lagergruppe .
@return Kommissionier-Lagergruppe */
@Override
public int getM_Warehouse_PickingGroup_ID ()
{
Integer... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java-gen\de\metas\vertical\pharma\msv3\server\model\X_MSV3_Server.java | 1 |
请完成以下Java代码 | public void delete(String groupId) {
GroupEntity group = dataManager.findById(groupId);
if (group != null) {
getMembershipEntityManager().deleteMembershipByGroupId(groupId);
if (getEventDispatcher() != null && getEventDispatcher().isEnabled()) {
getEventDispatch... | return dataManager.findGroupCountByNativeQuery(parameterMap);
}
@Override
public boolean isNewGroup(Group group) {
return ((GroupEntity) group).getRevision() == 0;
}
@Override
public List<Group> findGroupsByPrivilegeId(String privilegeId) {
return dataManager.findGroupsByPrivil... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\GroupEntityManagerImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Servlet getServlet() {
return this.servlet;
}
public static class Servlet {
/**
* Servlet init parameters to pass to Spring Web Services.
*/
private Map<String, String> init = new HashMap<>();
/**
* Load on startup priority of the Spring Web Services servlet.
*/
private int loadOnStart... | public void setInit(Map<String, String> init) {
this.init = init;
}
public int getLoadOnStartup() {
return this.loadOnStartup;
}
public void setLoadOnStartup(int loadOnStartup) {
this.loadOnStartup = loadOnStartup;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-webservices\src\main\java\org\springframework\boot\webservices\autoconfigure\WebServicesProperties.java | 2 |
请完成以下Java代码 | public Object apply(TypeConverter converter, Object o1, Object o2) {
return NumberOperations.sub(converter, o1, o2);
}
@Override
public String toString() {
return "-";
}
};
private final Operator operator;
private final AstNode left, right;
publ... | return "'" + operator.toString() + "'";
}
@Override
public void appendStructure(StringBuilder b, Bindings bindings) {
left.appendStructure(b, bindings);
b.append(' ');
b.append(operator);
b.append(' ');
right.appendStructure(b, bindings);
}
public int getCar... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstBinary.java | 1 |
请完成以下Java代码 | public class Message {
private Long id;
private String text;
private String summary;
private Calendar created = Calendar.getInstance();
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Calendar getCreated() {
return this.created;
}
public void setCreated(C... | public String getText() {
return this.text;
}
public void setText(String text) {
this.text = text;
}
public String getSummary() {
return this.summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
} | repos\spring-boot-leaning-master\2.x_42_courses\第 2-8 课: Spring Boot 构建一个 RESTful Web 服务\spring-boot-web-restful\src\main\java\com\neo\model\Message.java | 1 |
请完成以下Java代码 | public void addDataSource(Object key, DataSource dataSource) {
dataSources.put(key, dataSource);
}
public void removeDataSource(Object key) {
dataSources.remove(key);
}
@Override
public Connection getConnection() throws SQLException {
return getCurrentDataSource().getConnec... | return (T) this;
}
throw new SQLException("Cannot unwrap " + getClass().getName() + " as an instance of " + iface.getName());
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
return iface.isInstance(this);
}
public Map<Object, DataSource> getDat... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\cfg\multitenant\TenantAwareDataSource.java | 1 |
请完成以下Java代码 | public Class<?> getType(ELContext context, Object base, Object property) {
Objects.requireNonNull(context);
if (base instanceof ResourceBundle) {
context.setPropertyResolved(base, property);
/*
* ResourceBundles are always read-only so fall-through to return null
*/
}
return null;
}
@Override... | if (base instanceof ResourceBundle) {
context.setPropertyResolved(base, property);
return true;
}
return false;
}
@Override
public Class<?> getCommonPropertyType(ELContext context, Object base) {
if (base instanceof ResourceBundle) {
return String.class;
}
return null;
}
} | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\javax\el\ResourceBundleELResolver.java | 1 |
请完成以下Java代码 | private DDOrderLoader newLoader()
{
return DDOrderLoader.builder()
.productPlanningDAO(productPlanningDAO)
.distributionNetworkRepository(distributionNetworkRepository)
.ddOrderLowLevelService(ddOrderLowLevelService)
.replenishInfoRepository(replenishInfoRepository)
.build();
}
@ModelChange(
... | I_DD_OrderLine.COLUMNNAME_M_Locator_ID,
I_DD_OrderLine.COLUMNNAME_M_LocatorTo_ID })
public void fireDeleteDDOrderEvents(final I_DD_OrderLine ddOrderLineRecord)
{
if (InterfaceWrapperHelper.isNew(ddOrderLineRecord))
{
return;
}
final DDOrder ddOrder = newLoader().loadWithSingleLine(ddOrderLineRecord);... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\lowlevel\interceptor\DD_OrderLine_PostMaterialEvent.java | 1 |
请完成以下Java代码 | private Map<String, IDocActionItem> getDocActionItemsIndexedByValue()
{
if (docActionItemsByValue == null)
{
docActionItemsByValue = Services.get(IDocumentBL.class).retrieveDocActionItemsIndexedByValue();
}
return docActionItemsByValue;
}
/**
* ActionListener
*
* @param e event
*/
@Override
pu... | /**
* Save to Database
*
* @return true if saved to Tab
*/
private boolean save()
{
final IDocActionItem selectedDocAction = actionCombo.getSelectedItem();
if (selectedDocAction == null)
{
return false;
}
// Save Selection
log.info("DocAction={}", selectedDocAction);
m_mTab.setValue("DocActi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VDocAction.java | 1 |
请完成以下Java代码 | private JarFile createJarFileForStream(URL url, Version version, Consumer<JarFile> closeAction) throws IOException {
try (InputStream in = url.openStream()) {
return createJarFileForStream(in, version, closeAction);
}
}
private JarFile createJarFileForStream(InputStream in, Version version, Consumer<JarFile> ... | private void deleteIfPossible(Path local, Throwable cause) {
try {
Files.delete(local);
}
catch (IOException ex) {
cause.addSuppressed(ex);
}
}
static boolean isNestedUrl(URL url) {
return url.getProtocol().equalsIgnoreCase("nested");
}
} | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\UrlJarFileFactory.java | 1 |
请完成以下Java代码 | public @Nullable String getSessionId() {
return this.sessionId;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WebAuthenticationDetails that = (WebAuthenticationDetails) o;
return Objects.equals(this.re... | @Override
public int hashCode() {
return Objects.hash(this.remoteAddress, this.sessionId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName()).append(" [");
sb.append("RemoteIpAddress=").append(this.getRemoteAddress()).append(", ");
sb.appe... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\WebAuthenticationDetails.java | 1 |
请完成以下Java代码 | public List<String> getFailures() {
return failures;
}
public void setFailures(List<String> failures) {
this.failures = failures;
}
public String getSourceScopeId() {
return sourceScopeId;
}
public void setSourceScopeId(String sourceScopeId) {
this.sourceScopeId = sourceScopeId;
}
pu... | ArrayList<MigratingTransitionInstanceValidationReportDto> dtos = new ArrayList<MigratingTransitionInstanceValidationReportDto>();
for (MigratingTransitionInstanceValidationReport report : reports) {
dtos.add(MigratingTransitionInstanceValidationReportDto.from(report));
}
return dtos;
}
public sta... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\migration\MigratingTransitionInstanceValidationReportDto.java | 1 |
请完成以下Java代码 | public void updateQtyTU(final I_C_OrderLine orderLine, final ICalloutField field)
{
final IHUPackingAware packingAware = new OrderLineHUPackingAware(orderLine);
packingAwareBL.setQtyTU(packingAware);
packingAwareBL.setQtyLUFromQtyTU(packingAware);
packingAware.setQty(packingAware.getQty());
}
/**
* Task 0... | {
packingAwareBL.validateLUQty(orderLine.getQtyLU());
final IHUPackingAware packingAware = new OrderLineHUPackingAware(orderLine);
packingAwareBL.setQtyTUFromQtyLU(packingAware);
updateQtyCU(orderLine, field);
}
@CalloutMethod(columnNames = { I_C_OrderLine.COLUMNNAME_C_BPartner_ID
, I_C_OrderLine.COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\callout\C_OrderLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class KafkaCountingMessagesComponent {
@Value(value = "${spring.kafka.bootstrap-servers}")
private String bootstrapAddress;
public static Map<String, Object> props = new HashMap<>();
@PostConstruct
public void init(){
System.out.println(getTotalNumberOfMessagesInATopic("baeldung"));... | .collect(Collectors.toMap(Function.identity(), consumer::position));
return partitions.stream().mapToLong(p -> endPartitions.get(p)).sum();
}
public Map<String, Object> getProps() {
if (props.isEmpty()) {
props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress);
... | repos\tutorials-master\spring-kafka-4\src\main\java\com\baeldung\countingmessages\KafkaCountingMessagesComponent.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.H2)
.addScript(JdbcDaoImpl.DEFAULT_USER_SCHEMA_DDL_LOCATION)
.build();
}
@Bean
public UserDetailsService userDetailService(DataSource dataSource) {
var user = User.withUsername("in28minutes")
/... | .roles("ADMIN", "USER")
.build();
var jdbcUserDetailsManager = new JdbcUserDetailsManager(dataSource);
jdbcUserDetailsManager.createUser(user);
jdbcUserDetailsManager.createUser(admin);
return jdbcUserDetailsManager;
}
@Bean
public BCryptPasswordEncoder passwordEncoder() {
return new BCryptPasswo... | repos\master-spring-and-spring-boot-main\71-spring-security\src\main\java\com\in28minutes\learnspringsecurity\basic\BasicAuthSecurityConfiguration.java | 2 |
请完成以下Java代码 | public class Item extends SimpleItem
{
/**
* 该条目的索引,比如“啊”
*/
public String key;
public Item(String key, String label)
{
this(key);
labelMap.put(label, 1);
}
public Item(String key)
{
super();
this.key = key;
}
@Override
public String t... | /**
* 获取首个label
* @return
*/
public String firstLabel()
{
return labelMap.keySet().iterator().next();
}
/**
*
* @param param 类似 “希望 v 7685 vn 616” 的字串
* @return
*/
public static Item create(String param)
{
if (param == null) return null;
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\item\Item.java | 1 |
请完成以下Java代码 | public String getGroupId() {
return this.groupId;
}
/**
* Sets the group id.
* @param groupId the group id
*/
public void setGroupId(String groupId) {
this.groupId = groupId;
}
@Override
public String getArtifactId() {
return this.artifactId;
}
/**
* Sets the artifact id.
* @param artifactId ... | @Override
public String getPackageName() {
if (StringUtils.hasText(this.packageName)) {
return this.packageName;
}
if (StringUtils.hasText(this.groupId) && StringUtils.hasText(this.artifactId)) {
return this.groupId + "." + this.artifactId;
}
return null;
}
/**
* Sets the package name.
* @param ... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\project\MutableProjectDescription.java | 1 |
请完成以下Java代码 | public void setReversalLine_ID (int ReversalLine_ID)
{
if (ReversalLine_ID < 1)
set_Value (COLUMNNAME_ReversalLine_ID, null);
else
set_Value (COLUMNNAME_ReversalLine_ID, Integer.valueOf(ReversalLine_ID));
}
/** Get Reversal Line.
@return Use to keep the reversal line ID for reversing costing purpose
... | /** Set Zielmenge.
@param TargetQty
Target Movement Quantity
*/
@Override
public void setTargetQty (java.math.BigDecimal TargetQty)
{
set_Value (COLUMNNAME_TargetQty, TargetQty);
}
/** Get Zielmenge.
@return Target Movement Quantity
*/
@Override
public java.math.BigDecimal getTargetQty ()
{
B... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MovementLine.java | 1 |
请完成以下Java代码 | public void setDIM_Dimension_Spec_Attribute_ID (int DIM_Dimension_Spec_Attribute_ID)
{
if (DIM_Dimension_Spec_Attribute_ID < 1)
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_Attribute_ID, null);
else
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_Attribute_ID, Integer.valueOf(DIM_Dimension_Spec_Attribut... | Product Attribute Value
*/
@Override
public void setM_AttributeValue_ID (int M_AttributeValue_ID)
{
if (M_AttributeValue_ID < 1)
set_Value (COLUMNNAME_M_AttributeValue_ID, null);
else
set_Value (COLUMNNAME_M_AttributeValue_ID, Integer.valueOf(M_AttributeValue_ID));
}
/** Get Merkmals-Wert.
@retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Spec_AttributeValue.java | 1 |
请完成以下Java代码 | public int getPA_Measure_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PA_Measure_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_PA_Ratio getPA_Ratio() throws RuntimeException
{
return (I_PA_Ratio)MTable.get(getCtx(), I_PA_Ratio.Table_Name)
.getPO(getPA_Ratio_ID(), get_TrxN... | .getPO(getR_RequestType_ID(), get_TrxName()); }
/** Set Request Type.
@param R_RequestType_ID
Type of request (e.g. Inquiry, Complaint, ..)
*/
public void setR_RequestType_ID (int R_RequestType_ID)
{
if (R_RequestType_ID < 1)
set_Value (COLUMNNAME_R_RequestType_ID, null);
else
set_Value (COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Measure.java | 1 |
请完成以下Java代码 | private PInstanceId getPinstanceId()
{
return pinstanceId;
}
public ESRImportEnqueuer fromDataSource(final ESRImportEnqueuerDataSource fromDataSource)
{
this.fromDataSource = fromDataSource;
return this;
}
@NonNull
private ESRImportEnqueuerDataSource getFromDataSource()
{
return fromDataSource;
}
p... | {
this.data = data;
this.filename = filename;
}
@Override
public String getFilename()
{
return filename;
}
@Override
public String getDescription()
{
return null;
}
@Override
public InputStream getInputStream()
{
return new ByteArrayInputStream(data);
}
public byte[] getDa... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\dataimporter\ESRImportEnqueuer.java | 1 |
请完成以下Java代码 | private String getQtysDisplayName()
{
if (_qtyTUPlanned == null && _qtyTUMoved == null)
{
return null;
}
final StringBuilder sb = new StringBuilder();
//
// Qty Moved
if (_qtyTUMoved != null)
{
sb.append(toQtyTUString(_qtyTUMoved));
}
//
// Qty Planned
{
if (sb.length() > 0)
{
... | return _huPIItemProduct;
}
@Override
public IHUPIItemProductDisplayNameBuilder setQtyTUPlanned(final BigDecimal qtyTUPlanned)
{
_qtyTUPlanned = qtyTUPlanned;
return this;
}
@Override
public IHUPIItemProductDisplayNameBuilder setQtyTUPlanned(final int qtyTUPlanned)
{
setQtyTUPlanned(BigDecimal.valueOf(qt... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductDisplayNameBuilder.java | 1 |
请完成以下Java代码 | public UUID getId() {
return id;
}
public void setId(final UUID id) {
this.id = id;
}
public Integer getVersion() {
return version;
}
public void setVersion(final Integer version) {
this.version = version;
}
public String getPassword() {
return... | }
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return authorities != null ? authorities : Collections.emptyList();
}
@Override
public void setAuthorities(final Collection<? extends GrantedAuthority> authorities) {
this.authorities = authorities;
}
... | repos\tutorials-master\spring-boot-modules\jmix\src\main\java\com\baeldung\jmix\expensetracker\entity\User.java | 1 |
请完成以下Java代码 | public OrderFactory warehouseId(@Nullable final WarehouseId warehouseId)
{
assertNotBuilt();
order.setM_Warehouse_ID(WarehouseId.toRepoId(warehouseId));
return this;
}
public OrderFactory orgId(@NonNull final OrgId orgId)
{
assertNotBuilt();
order.setAD_Org_ID(orgId.getRepoId());
return this;
}
publ... | }
public BPartnerId getShipBPartnerId()
{
return BPartnerId.ofRepoId(order.getC_BPartner_ID());
}
public OrderFactory pricingSystemId(@NonNull final PricingSystemId pricingSystemId)
{
assertNotBuilt();
order.setM_PricingSystem_ID(pricingSystemId.getRepoId());
return this;
}
public OrderFactory poRefer... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderFactory.java | 1 |
请完成以下Java代码 | public class X_M_Source_HU extends org.compiere.model.PO implements I_M_Source_HU, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = 1877649145L;
/** Standard Constructor */
public X_M_Source_HU (final Properties ctx, final int M_Source_HU_ID, @Nullable final String trxName)
... | else
set_Value (COLUMNNAME_M_HU_ID, M_HU_ID);
}
@Override
public int getM_HU_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_ID);
}
@Override
public void setM_Source_HU_ID (final int M_Source_HU_ID)
{
if (M_Source_HU_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Source_HU_ID, null);
else
set_ValueNoC... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Source_HU.java | 1 |
请完成以下Java代码 | public class Emit extends Interval implements Intervalable
{
/**
* 匹配到的模式串
*/
private final String keyword;
/**
* 构造一个模式串匹配结果
* @param start 起点
* @param end 重点
* @param keyword 模式串
*/
public Emit(final int start, final int end, final String keyword)
{
supe... | }
/**
* 获取对应的模式串
* @return 模式串
*/
public String getKeyword()
{
return this.keyword;
}
@Override
public String toString()
{
return super.toString() + "=" + this.keyword;
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\algorithm\ahocorasick\trie\Emit.java | 1 |
请完成以下Java代码 | public String getBIC() {
return bic;
}
/**
* Sets the value of the bic property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBIC(String value) {
this.bic = value;
}
/**
* Gets the value of the othr... | public OthrIdentification getOthr() {
return othr;
}
/**
* Sets the value of the othr property.
*
* @param value
* allowed object is
* {@link OthrIdentification }
*
*/
public void setOthr(OthrIdentification value) {
this.othr = value;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\FinancialInstitutionIdentificationSEPA3.java | 1 |
请完成以下Java代码 | public class SqlSelectDisplayValue
{
@Nullable private final String joinOnTableNameOrAlias;
@NonNull private final String joinOnColumnName;
@Nullable private final SqlForFetchingLookupById sqlExpression;
@Getter
@NonNull private final String columnNameAlias;
@Builder(toBuilder = true)
private SqlSelectDisplayVa... | public IStringExpression toOrderByStringExpression()
{
final String joinOnColumnNameFQ = !Check.isEmpty(joinOnTableNameOrAlias)
? joinOnTableNameOrAlias + "." + joinOnColumnName
: joinOnColumnName;
if (sqlExpression == null)
{
return ConstantStringExpression.of(joinOnColumnNameFQ);
}
else
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlSelectDisplayValue.java | 1 |
请完成以下Java代码 | public String getIncidentMessage() {
return incidentMessage;
}
public String getTenantId() {
return tenantId;
}
public String getJobDefinitionId() {
return jobDefinitionId;
}
public String getAnnotation() {
return annotation;
}
public static IncidentDto fromIncident(Incident incident... | dto.processInstanceId = incident.getProcessInstanceId();
dto.executionId = incident.getExecutionId();
dto.incidentTimestamp = incident.getIncidentTimestamp();
dto.incidentType = incident.getIncidentType();
dto.activityId = incident.getActivityId();
dto.failedActivityId = incident.getFailedActivityId... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\IncidentDto.java | 1 |
请完成以下Java代码 | public String getPgNb() {
return pgNb;
}
/**
* Sets the value of the pgNb property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPgNb(String value) {
this.pgNb = value;
}
/**
* Gets the value of the... | *
*/
public boolean isLastPgInd() {
return lastPgInd;
}
/**
* Sets the value of the lastPgInd property.
*
*/
public void setLastPgInd(boolean value) {
this.lastPgInd = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\Pagination.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static AutoConfigurationMetadata loadMetadata(Properties properties) {
return new PropertiesAutoConfigurationMetadata(properties);
}
/**
* {@link AutoConfigurationMetadata} implementation backed by a properties file.
*/
private static class PropertiesAutoConfigurationMetadata implements AutoConfigurationMetad... | return getSet(className, key, null);
}
@Override
public @Nullable Set<String> getSet(String className, String key, @Nullable Set<String> defaultValue) {
String value = get(className, key);
return (value != null) ? StringUtils.commaDelimitedListToSet(value) : defaultValue;
}
@Override
public @Nullabl... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\AutoConfigurationMetadataLoader.java | 2 |
请完成以下Java代码 | private Optional<PaymentProcessor> getPaymentProcessorIfExists(final PaymentRule paymentRule)
{
return paymentProcessors.getByPaymentRule(paymentRule);
}
public void captureAmount(@NonNull final PaymentReservationCaptureRequest request)
{
final PaymentReservation reservation = getBySalesOrderIdNotVoided(reques... | capturesRepo.save(capture);
paymentProcessor.processCapture(reservation, capture);
reservationsRepo.save(reservation);
capture.setStatusAsCompleted();
capturesRepo.save(capture);
}
private PaymentId createPayment(@NonNull final PaymentReservationCaptureRequest request)
{
final I_C_Payment payment = Serv... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\reservation\PaymentReservationService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static WsdlDefinitionBeanFactoryPostProcessor wsdlDefinitionBeanFactoryPostProcessor() {
return new WsdlDefinitionBeanFactoryPostProcessor();
}
@Configuration(proxyBeanMethods = false)
@EnableWs
protected static class WsConfiguration {
}
static class WsdlDefinitionBeanFactoryPostProcessor
implements BeanD... | .rootBeanDefinition(type, () -> beanSupplier.apply(resource))
.getBeanDefinition();
String filename = resource.getFilename();
Assert.state(filename != null, "'filename' must not be null");
registry.registerBeanDefinition(StringUtils.stripFilenameExtension(filename), beanDefinition);
}
}
private... | repos\spring-boot-4.0.1\module\spring-boot-webservices\src\main\java\org\springframework\boot\webservices\autoconfigure\WebServicesAutoConfiguration.java | 2 |
请完成以下Java代码 | public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Verarbeitet.
@return Checkbox sagt aus, ob der Beleg verarbeitet wurde.
*/
@Override
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
... | if (bd == null)
{
return Env.ZERO;
}
return bd;
}
/** Set Menge (old).
@param Qty_Old Menge (old) */
@Override
public void setQty_Old (java.math.BigDecimal Qty_Old)
{
set_Value (COLUMNNAME_Qty_Old, Qty_Old);
}
/** Get Menge (old).
@return Menge (old) */
@Override
public java.math.BigDecima... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java-gen\de\metas\procurement\base\model\X_PMM_RfQResponse_ChangeEvent.java | 1 |
请完成以下Java代码 | public void setSize(int newSize)
{
keys.setSize(newSize);
elements.setSize(newSize);
}
public void setGrow(int growBy)
{
keys.setGrow(growBy);
elements.setGrow(growBy);
}
public synchronized void put(String key,Object element)
{
try
{
... | public Enumeration keys()
{
return keys;
}
public boolean containsKey(String key)
{
try
{
keys.location(key);
}
catch(org.apache.ecs.storage.NoSuchObjectException noSuchObject)
{
return false;
}
return(true);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\storage\Hash.java | 1 |
请完成以下Java代码 | public InOutCostsViewData getData(
@NonNull final SOTrx soTrx,
@NonNull final InvoiceAndLineId invoiceAndLineId,
@Nullable final DocumentFilter filter)
{
return InOutCostsViewData.builder()
.viewDataService(this)
.soTrx(soTrx)
.invoiceAndLineId(invoiceAndLineId)
.filter(filter)
.build();... | return newLoader().loadRows(inoutCosts);
}
private InOutCostRowsLoader newLoader()
{
return InOutCostRowsLoader.builder()
.moneyService(moneyService)
.bpartnerLookup(bpartnerLookup)
.orderLookup(orderLookup)
.inoutLookup(inoutLookup)
.costTypeLookup(costTypeLookup)
.build();
}
public Am... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoice\match_inout_costs\InOutCostsViewDataService.java | 1 |
请完成以下Java代码 | protected Iterator<IDunnableDoc> createRawSourceIterator(final IDunningContext context)
{
final Iterator<I_C_Dunning_Candidate_Invoice_v1> it = Services.get(IInvoiceSourceDAO.class).retrieveDunningCandidateInvoices(context);
return IteratorUtils.map(it, candidate -> createDunnableDoc(context, candidate));
}
pri... | documentNo = invoice.getDocumentNo();
}
}
final int daysDue;
if (invoicePayScheduleId > 0)
{
daysDue = TimeUtil.getDaysBetween(dueDate, context.getDunningDate());
}
else
{
final IInvoiceSourceDAO invoiceSourceDAO = Services.get(IInvoiceSourceDAO.class);
daysDue = invoiceSourceDAO.retrieveDue... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\invoice\spi\impl\InvoiceSource.java | 1 |
请完成以下Java代码 | public static Json succ() {
return new Json();
}
public static Json succ(String operate) {
return new Json(operate, true, DEFAULT_SUCC_CODE, DEFAULT_SUCC_MSG, null);
}
public static Json succ(String operate, String message) {
return new Json(operate, true, DEFAULT_SUCC_CODE, message, null);
}
public stat... | /** 设置操作名称 */
public Json oper(String operate) {
this.put(KEY_OPER, operate);
return this;
}
/** 设置操作结果是否成功的标记 */
public Json succ(boolean success) {
this.put(KEY_SUCC, success);
return this;
}
/** 设置操作结果的代码 */
public Json code(int code) {
this.put(KEY_CODE, code);
return this;
}
/** 设置操作结果的信息 *... | repos\spring-boot-quick-master\quick-spring-shiro\src\main\java\com\shiro\vo\Json.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setClassname (final java.lang.String Classname)
{
set_Value (COLUMNNAME_Classname, Classname);
}
@Override
public java.lang.String getClassname()
{
return ... | public int getM_IolCandHandler_ID()
{
return get_ValueAsInt(COLUMNNAME_M_IolCandHandler_ID);
}
@Override
public void setTableName (final java.lang.String TableName)
{
set_Value (COLUMNNAME_TableName, TableName);
}
@Override
public java.lang.String getTableName()
{
return get_ValueAsString(COLUMNNAME_... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_IolCandHandler.java | 1 |
请完成以下Java代码 | public int getPP_OrderLine_Candidate_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_OrderLine_Candidate_ID);
}
@Override
public org.eevolution.model.I_PP_Product_BOMLine getPP_Product_BOMLine()
{
return get_ValueAsPO(COLUMNNAME_PP_Product_BOMLine_ID, org.eevolution.model.I_PP_Product_BOMLine.class);
}
@Overri... | else
set_ValueNoCheck (COLUMNNAME_PP_Product_BOMLine_ID, PP_Product_BOMLine_ID);
}
@Override
public int getPP_Product_BOMLine_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_Product_BOMLine_ID);
}
@Override
public void setQtyEntered (final @Nullable BigDecimal QtyEntered)
{
set_Value (COLUMNNAME_QtyEntere... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_OrderLine_Candidate.java | 1 |
请完成以下Java代码 | public int size()
{
return size;
}
/**
* @return <code>true</code> if the "goal" record was found, or if there aren't forther records in the queue to check.
*/
@Override
public boolean isQueueEmpty()
{
if (foundGoal)
{
return true;
}
return queueItemsToProcess.isEmpty();
}
@Override
public ... | }
result.add(start);
for (final DefaultEdge e : path)
{
final ITableRecordReference edgeSource = undirectedGraph.getEdgeSource(e);
if (!result.contains(edgeSource))
{
result.add(edgeSource);
}
else
{
result.add(undirectedGraph.getEdgeTarget(e));
}
}
return ImmutableList.copyOf(re... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\graph\FindPathIterateResult.java | 1 |
请完成以下Java代码 | public List<ITableRecordReference> getRecordsFlat()
{
return records.values().stream().flatMap(v -> v.stream()).collect(Collectors.toList());
}
/**
* Gets the records that were added via {@link #withRecords(Map)}.
* <p>
* <b>IMPORTANT:</b> please see the note at {@link #getRecordsFlat()}.
*
* @return th... | return result;
}
public static WorkQueue of(final ITableRecordReference tableRecordRef)
{
return new WorkQueue(tableRecordRef);
}
private final ITableRecordReference tableRecordReference;
private int dlmPartitionWorkqueueId;
private WorkQueue(final ITableRecordReference tableRecordReference)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\Partition.java | 1 |
请完成以下Java代码 | public class SimpleGrantedAuthoritiesResolver implements GrantedAuthoritiesResolver {
@Override
public Collection<? extends GrantedAuthority> getAuthorities(@NonNull Principal principal) {
return Optional.of(principal)
.filter(this::isSupportedPrincipal)
.map(this.getPrincipalCl... | return Optional.ofNullable(authentication.getAuthorities()).orElseGet(this::emptyAuthorities);
}
protected <T> Collection<T> emptyAuthorities() {
return emptyList();
}
protected Boolean isSupportedPrincipal(Principal principal) {
return getPrincipalClass().isInstance(principal);
}
... | repos\Activiti-develop\activiti-core-common\activiti-spring-security\src\main\java\org\activiti\core\common\spring\security\SimpleGrantedAuthoritiesResolver.java | 1 |
请完成以下Java代码 | public boolean isDefault ()
{
Object oo = get_Value(COLUMNNAME_IsDefault);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setN... | */
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Search Key.
@param Value
Search key for the record in the format required - must be unique
*/
public void setValue (String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Search ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Concept_Category.java | 1 |
请完成以下Java代码 | public PageResult<String> findKeysForPage(String patternKey, int currentPage, int pageSize) {
ScanOptions options = ScanOptions.scanOptions().match(patternKey).build();
RedisConnectionFactory factory = stringRedisTemplate.getConnectionFactory();
RedisConnection rc = factory.getConnection();
... | /**
* 删除 Redis 中的某个key
*
* @param key 键
*/
public void delete(String key) {
stringRedisTemplate.delete(key);
}
/**
* 批量删除 Redis 中的某些key
*
* @param keys 键列表
*/
public void delete(Collection<String> keys) {
stringRedisTemplate.delete(keys);
}
} | repos\spring-boot-demo-master\demo-rbac-security\src\main\java\com\xkcoding\rbac\security\util\RedisUtil.java | 1 |
请完成以下Java代码 | public java.sql.Timestamp getValidFrom ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidFrom);
}
/** Set Gültig bis.
@param ValidTo
Gültig bis inklusiv (letzter Tag)
*/
@Override
public void setValidTo (java.sql.Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
}
/** Get Gült... | /** Set VAT Code.
@param VATCode VAT Code */
@Override
public void setVATCode (java.lang.String VATCode)
{
set_Value (COLUMNNAME_VATCode, VATCode);
}
/** Get VAT Code.
@return VAT Code */
@Override
public java.lang.String getVATCode ()
{
return (java.lang.String)get_Value(COLUMNNAME_VATCode);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_C_VAT_Code.java | 1 |
请完成以下Java代码 | public List<String> getInstalledServices() {
return installedServices;
}
// builder /////////////////////////////
public static class DeploymentOperationBuilder {
protected PlatformServiceContainer container;
protected String name;
protected boolean isUndeploymentOperation = false;
protecte... | public DeploymentOperationBuilder setUndeploymentOperation() {
isUndeploymentOperation = true;
return this;
}
public void execute() {
DeploymentOperation operation = new DeploymentOperation(name, container, steps);
operation.isRollbackOnFailure = !isUndeploymentOperation;
operatio... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\spi\DeploymentOperation.java | 1 |
请完成以下Java代码 | public class MustacheView extends AbstractTemplateView {
private @Nullable Compiler compiler;
private @Nullable Charset charset;
/**
* Set the Mustache compiler to be used by this view.
* <p>
* Typically this property is not set directly. Instead a single {@link Compiler} is
* expected in the Spring appli... | if (template != null) {
template.execute(model, response.getWriter());
}
}
private @Nullable Resource getResource() {
ApplicationContext applicationContext = getApplicationContext();
String url = getUrl();
if (applicationContext == null || url == null) {
return null;
}
Resource resource = applicati... | repos\spring-boot-main\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\servlet\view\MustacheView.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public EventDeploymentBuilder addEventDefinition(String resourceName, String eventDefinition) {
addString(resourceName, eventDefinition);
return this;
}
@Override
public EventDeploymentBuilder addChannelDefinitionBytes(String resourceName, byte[] channelDefinitionBytes) {
if (ch... | @Override
public EventDeploymentBuilder enableDuplicateFiltering() {
this.isDuplicateFilterEnabled = true;
return this;
}
@Override
public EventDeployment deploy() {
return repositoryService.deploy(this);
}
// getters and setters
// /////////////////////////////////... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\repository\EventDeploymentBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class AcctSchemaGeneralLedger
{
boolean suspenseBalancing;
Account suspenseBalancingAcct;
boolean currencyBalancing;
Account currencyBalancingAcct;
@NonNull
Account intercompanyDueToAcct;
@NonNull
Account intercompanyDueFromAcct;
@NonNull
Account incomeSummaryAcct;
@NonNull
Account retainedEarning... | @NonNull
Account purchasePriceVarianceOffsetAcct;
@NonNull
Account cashRoundingAcct;
@NonNull
public Account getDueToAcct(final AcctSchemaElementType segment)
{
return intercompanyDueToAcct;
}
@NonNull
public Account getDueFromAcct(final AcctSchemaElementType segment)
{
return intercompanyDueFromAcct;... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\AcctSchemaGeneralLedger.java | 2 |
请完成以下Java代码 | public String getType() {
return TYPE;
}
public void execute(EventSubscriptionJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
// lookup subscription:
String eventSubscriptionId = configuration.getEventSubscriptionId();
EventSubscriptionEn... | public EventSubscriptionJobConfiguration(String eventSubscriptionId) {
this.eventSubscriptionId = eventSubscriptionId;
}
public String getEventSubscriptionId() {
return eventSubscriptionId;
}
@Override
public String toCanonicalString() {
return eventSubscriptionId;
}
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\ProcessEventJobHandler.java | 1 |
请完成以下Java代码 | public class PlainVendorReceipt implements IVendorReceipt<Object>
{
private I_M_Product product;
private BigDecimal qtyReceived;
private I_C_UOM qtyReceivedUOM;
private IHandlingUnitsInfo handlingUnitsInfo;
private I_M_PriceList_Version plv;
@Override
public String toString()
{
final StringBuilder sb = new S... | this.qtyReceivedUOM = qtyReceivedUOM;
}
@Override
public IHandlingUnitsInfo getHandlingUnitsInfo()
{
return handlingUnitsInfo;
}
public void setHandlingUnitsInfo(final IHandlingUnitsInfo handlingUnitsInfo)
{
this.handlingUnitsInfo = handlingUnitsInfo;
}
/**
* This method does nothing!
*/
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PlainVendorReceipt.java | 1 |
请完成以下Java代码 | public <T extends PO> T getPO(final Object model, final boolean strict)
{
if (strict)
{
return null;
}
if (model instanceof GridTab)
{
final GridTab gridTab = (GridTab)model;
return GridTabWrapper.getPO(Env.getCtx(), gridTab);
}
final GridTabWrapper wrapper = GridTabWrapper.getWrapper(model);
... | }
@Override
public Evaluatee getEvaluatee(final Object model)
{
return GridTabWrapper.getGridTab(model);
}
@Override
public boolean isCopy(final Object model)
{
return GridTabWrapper.getGridTab(model).getTableModel().isRecordCopyingMode();
}
@Override
public boolean isCopying(final Object model)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\GridTabInterfaceWrapperHelper.java | 1 |
请完成以下Java代码 | public void setConvertToUpperCase(boolean convertToUpperCase) {
this.convertToUpperCase = convertToUpperCase;
}
/**
* The name of the attribute which contains the user's password. Defaults to
* "userPassword".
* @param passwordAttributeName the name of the attribute
*/
public void setPasswordAttributeName... | * returned LdapUserDetails object. The attribute values must be Strings by default.
* @param roleAttributes the names of the role attributes.
*/
public void setRoleAttributes(String[] roleAttributes) {
Assert.notNull(roleAttributes, "roleAttributes array cannot be null");
this.roleAttributes = roleAttributes;
... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\userdetails\LdapUserDetailsMapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | DefaultMethodSecurityExpressionHandler getBean() {
this.handler.setDefaultRolePrefix(this.rolePrefix);
return this.handler;
}
}
abstract static class AbstractGrantedAuthorityDefaultsBeanFactory implements ApplicationContextAware {
protected String rolePrefix = "ROLE_";
@Override
public final void se... | @Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
if (!registry.containsBeanDefinition(this.beanName)) {
return;
}
BeanDefinition beanDefinition = registry.getBeanDefinition(this.beanName);
beanDefinition.setLazyInit(true);
}
@Overrid... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\method\GlobalMethodSecurityBeanDefinitionParser.java | 2 |
请完成以下Java代码 | public class IntermediateCatchEventValidator extends ProcessLevelValidator {
@Override
protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) {
List<IntermediateCatchEvent> intermediateCatchEvents = process.findFlowElementsOfType(
IntermediateCa... | if (
!(eventDefinition instanceof TimerEventDefinition) &&
!(eventDefinition instanceof SignalEventDefinition) &&
!(eventDefinition instanceof MessageEventDefinition) &&
!(eventDefinition instanceof LinkEventDefinition)
) {
... | repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\validator\impl\IntermediateCatchEventValidator.java | 1 |
请完成以下Java代码 | public abstract class CmmnSentryPart implements Serializable {
private static final long serialVersionUID = 1L;
protected String type;
protected String sentryId;
protected String standardEvent;
protected String source;
protected String variableEvent;
protected String variableName;
protected boolean sa... | * does not reference the source case execution id anymore.
*/
public abstract void setSourceCaseExecution(CmmnExecution sourceCaseExecution);
public String getStandardEvent() {
return standardEvent;
}
public void setStandardEvent(String standardEvent) {
this.standardEvent = standardEvent;
}
pu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\execution\CmmnSentryPart.java | 1 |
请完成以下Java代码 | private void updateQtyOrderedAndBatches(@NonNull final I_PP_Order ppOrder)
{
final ProductId productId = ProductId.ofRepoIdOrNull(ppOrder.getM_Product_ID());
if (productId == null)
{
return;
}
final UomId uomToId = UomId.ofRepoIdOrNull(ppOrder.getC_UOM_ID());
if (uomToId == null)
{
return;
}
... | final ProductPlanning productPlanningOrig = productPlanningDAO.find(query).orElse(null);
final ProductPlanning.ProductPlanningBuilder builder;
if (productPlanningOrig == null)
{
builder = ProductPlanning.builder()
.orgId(OrgId.ofRepoId(ppOrderWithProductId.getAD_Org_ID()))
.warehouseId(WarehouseId.o... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\callout\PP_Order.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void saveData(RpAccountCheckMistakeScratchPool RpAccountCheckMistakeScratchPool) {
rpAccountCheckMistakeScratchPoolDao.insert(RpAccountCheckMistakeScratchPool);
}
/**
* 批量保存记录
*
* @param ScratchPoolList
*/
public void savaListDate(List<RpAccountCheckMistakeScratchPool> scratchPoolList) {
for (Rp... | /**
* 从缓冲池中删除数据
*
* @param scratchPoolList
*/
public void deleteFromPool(List<RpAccountCheckMistakeScratchPool> scratchPoolList) {
for (RpAccountCheckMistakeScratchPool record : scratchPoolList) {
rpAccountCheckMistakeScratchPoolDao.delete(record.getId());
}
}
/**
* 查询出缓存池中所有的数据
*
* @return
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\service\impl\RpAccountCheckMistakeScratchPoolServiceImpl.java | 2 |
请完成以下Java代码 | protected void assertValid(final IPackingMaterialDocumentLineSource source)
{
Check.assumeInstanceOf(source, PlainPackingMaterialDocumentLineSource.class, "source");
}
@Override
protected IPackingMaterialDocumentLine createPackingMaterialDocumentLine(@NonNull final ProductId productId)
{
final I_M_InOut inout... | }
@Override
protected void createDocumentLine(@NonNull final IPackingMaterialDocumentLine pmLine)
{
final EmptiesInOutLinePackingMaterialDocumentLine inoutLinePMLine = toImpl(pmLine);
final I_M_InOut inout = getM_InOut();
InterfaceWrapperHelper.save(inout); // make sure inout header is saved
final I_M_InO... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\empties\EmptiesInOutLinesProducer.java | 1 |
请完成以下Java代码 | public boolean hasLocalNamespace() {
if (element != null) {
return element.getNamespaceURI().equals(namespaceUri);
}
else {
return false;
}
}
private String determinePrefixAndNamespaceUri() {
if (namespaceUri != null) {
if (rootElement != null && namespaceUri.equals(rootElemen... | return null;
}
}
private String lookupPrefix() {
if (namespaceUri != null) {
String lookupPrefix = null;
if (element != null) {
lookupPrefix = element.lookupPrefix(namespaceUri);
}
else if (rootElement != null) {
lookupPrefix = rootElement.lookupPrefix(namespaceUri);... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\XmlQName.java | 1 |
请完成以下Java代码 | private UserIdWithGroupsCollection retrieveUserAssignments(@NonNull final UserId userId)
{
final ImmutableSet<UserGroupUserAssignment> assignments = queryBL
.createQueryBuilderOutOfTrx(I_AD_UserGroup_User_Assign.class)
.addEqualsFilter(I_AD_UserGroup_User_Assign.COLUMN_AD_User_ID, userId)
.addOnlyActiveR... | if (validTo == null)
{
return Range.all();
}
else
{
return Range.atMost(validTo);
}
}
else
{
if (validTo == null)
{
return Range.atLeast(validFrom);
}
else
{
return Range.closed(validFrom, validTo);
}
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\UserGroupRepository.java | 1 |
请完成以下Java代码 | public Pointcut getPointcut() {
return this.pointcut;
}
public void setPointcut(Pointcut pointcut) {
this.pointcut = pointcut;
}
@Override
public Advice getAdvice() {
return this;
}
@Override
public boolean isPerInstance() {
return true;
}
static final class MethodReturnTypePointcut extends Static... | private final Predicate<Class<?>> returnTypeMatches;
MethodReturnTypePointcut(Predicate<Class<?>> returnTypeMatches) {
this.returnTypeMatches = returnTypeMatches;
}
@Override
public boolean matches(Method method, Class<?> targetClass) {
return this.returnTypeMatches.test(method.getReturnType());
}
}... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\AuthorizeReturnObjectMethodInterceptor.java | 1 |
请完成以下Java代码 | public head addElement (String hashcode, String element)
{
addElementToRegistry (hashcode, element);
return (this);
}
/**
* Adds an Element to the element.
*
* @param element
* Adds an Element to the element.
*/
public head addElement (Element element)
{
addElementToRegistry (element);... | * Adds an Element to the element.
*/
public head addElement (String element)
{
addElementToRegistry (element);
return (this);
}
/**
* Removes an Element from the element.
*
* @param hashcode
* the name of the element to be removed.
*/
public head removeElement (String hashco... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\head.java | 1 |
请完成以下Java代码 | public Optional<JsonResponseCompositeList> retrieveBPartnersSince(@NonNull final RetrieveBPartnerSinceRequest retrieveBPartnerSinceRequest)
{
final SinceQuery sinceQuery;
final OrgId orgId;
if (Check.isBlank(retrieveBPartnerSinceRequest.getOrgCode()))
{
orgId = null;
}
else
{
orgId = RestUtils.ret... | if (!optionalPage.isPresent())
{
return Optional.empty();
}
final QueryResultPage<JsonResponseComposite> page = optionalPage.get();
final ImmutableList<JsonResponseContact> jsonContacts = page
.getItems()
.stream()
.flatMap(bpc -> bpc.getContacts().stream())
.collect(ImmutableList.toImmutab... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\bpartner\BPartnerEndpointService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserServiceImpl implements UserService {
private final UserDao userDao;
@Autowired
public UserServiceImpl(UserDao userDao) {
this.userDao = userDao;
}
/**
* 新增用户
*
* @param user 用户
*/
@Override
public User saveUser(User user) {
userDao.inse... | * 查询单个用户
*
* @param id 主键id
* @return 用户信息
*/
@Override
public User getUser(Long id) {
return userDao.single(id);
}
/**
* 查询用户列表
*
* @return 用户列表
*/
@Override
public List<User> getUserList() {
return userDao.all();
}
/**
* 分页... | repos\spring-boot-demo-master\demo-orm-beetlsql\src\main\java\com\xkcoding\orm\beetlsql\service\impl\UserServiceImpl.java | 2 |
请完成以下Java代码 | public Map<Class<?>, Map<String, Object>> getCacheConfigurations() {
return cacheConfigurations;
}
public void setCacheConfigurations(Map<Class<?>, Map<String, Object>> cacheConfigurations) {
this.cacheConfigurations = cacheConfigurations;
}
public void addCacheConfiguration(Class<?> halResourceClass,... | JsonNode jsonNode = jsonConfiguration.get(CONFIG_CACHES);
if (jsonNode != null) {
Iterator<Entry<String, JsonNode>> cacheConfigurations = jsonNode.fields();
while (cacheConfigurations.hasNext()) {
Entry<String, JsonNode> cacheConfiguration = cacheConfigurations.next();
parseCacheConfigur... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\hal\cache\HalRelationCacheConfiguration.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: demo-provider
cloud:
# Nacos 作为注册中心的配置项
nacos:
discovery:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
# Zipkin 配置项,对应 ZipkinProperties 类
zipkin:
base-url: http://127.0.0.1:9411 # Zipkin 服务的地址
# Dubbo 配置项,对应 DubboConfigurationProperties 类
dubbo:
scan:
... | address: spring-cloud://127.0.0.1:8848 # 指定 Dubbo 服务注册中心的地址
# Dubbo 服务提供者的配置,对应 ProviderConfig 类
provider:
filter: tracing
# Spring Cloud Alibaba Dubbo 专属配置项,对应 DubboCloudProperties 类
cloud:
subscribed-services: '' # 设置订阅的应用列表,默认为 * 订阅所有应用。 | repos\SpringBoot-Labs-master\labx-13\labx-13-sc-sleuth-dubbo\labx-13-sc-sleuth-dubbo-provider\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public void deleteHistoricTaskInstance(String taskId) {
commandExecutor.execute(new DeleteHistoricTaskInstanceCmd(taskId));
}
@Override
public void deleteHistoricProcessInstance(String processInstanceId) {
commandExecutor.execute(new DeleteHistoricProcessInstanceCmd(processInstanceId));
... | return new NativeHistoricActivityInstanceQueryImpl(commandExecutor);
}
@Override
public List<HistoricIdentityLink> getHistoricIdentityLinksForProcessInstance(String processInstanceId) {
return commandExecutor.execute(new GetHistoricIdentityLinksForTaskCmd(null, processInstanceId));
}
@Over... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoryServiceImpl.java | 1 |
请完成以下Java代码 | public PrintElement[] getElements()
{
if (m_pe == null)
{
m_pe = new PrintElement[m_elements.size()];
m_elements.toArray(m_pe);
}
return m_pe;
} // getElements
/**
* Paint Page Header/Footer on Graphics in Bounds
*
* @param g2D graphics
* @param bounds page bounds
* @param isView true if... | /**
* Get DrillDown value
* @param relativePoint relative Point
* @return if found NamePait or null
*/
public MQuery getDrillDown (Point relativePoint)
{
MQuery retValue = null;
for (int i = 0; i < m_elements.size() && retValue == null; i++)
{
PrintElement element = (PrintElement)m_elements.get(i)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\HeaderFooter.java | 1 |
请完成以下Java代码 | public void setFlatrateAmtPerUOM (final @Nullable BigDecimal FlatrateAmtPerUOM)
{
set_Value (COLUMNNAME_FlatrateAmtPerUOM, FlatrateAmtPerUOM);
}
@Override
public BigDecimal getFlatrateAmtPerUOM()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_FlatrateAmtPerUOM);
return bd != null ? bd : BigDecima... | public void setQty_Planned (final @Nullable BigDecimal Qty_Planned)
{
set_Value (COLUMNNAME_Qty_Planned, Qty_Planned);
}
@Override
public BigDecimal getQty_Planned()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty_Planned);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void ... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_DataEntry.java | 1 |
请完成以下Java代码 | public class ErrorType
extends NotificationType
{
@XmlAttribute(name = "error_value")
protected String errorValue;
@XmlAttribute(name = "valid_value")
protected String validValue;
@XmlAttribute(name = "record_id")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger recordId;
... | */
public void setValidValue(String value) {
this.validValue = value;
}
/**
* Gets the value of the recordId property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getRecordId() {
return recordId;
}
... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\ErrorType.java | 1 |
请完成以下Java代码 | public String getClientRegistrationId() {
return this.clientRegistrationId;
}
/**
* Returns the name of the End-User {@code Principal} (Resource Owner).
* @return the name of the End-User
* @since 6.3
*/
public String getPrincipalName() {
return this.principalName;
}
@Override
public boolean equals(... | return true;
}
if (obj == null || this.getClass() != obj.getClass()) {
return false;
}
OAuth2AuthorizedClientId that = (OAuth2AuthorizedClientId) obj;
return Objects.equals(this.clientRegistrationId, that.clientRegistrationId)
&& Objects.equals(this.principalName, that.principalName);
}
@Override
p... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\OAuth2AuthorizedClientId.java | 1 |
请完成以下Java代码 | public void setAD_Printer_ID (int AD_Printer_ID)
{
if (AD_Printer_ID < 1)
set_Value (COLUMNNAME_AD_Printer_ID, null);
else
set_Value (COLUMNNAME_AD_Printer_ID, Integer.valueOf(AD_Printer_ID));
}
@Override
public int getAD_Printer_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Printer_ID);
}
@Overrid... | @Override
public java.lang.String getDescription()
{
return (java.lang.String)get_Value(COLUMNNAME_Description);
}
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return (java.lang.String)get_Value(COLUMNNAME_... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_Printer_Tray.java | 1 |
请完成以下Java代码 | public String getTp() {
return tp;
}
/**
* Sets the value of the tp property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTp(String value) {
this.tp = value;
}
/**
* Gets the value of the dt proper... | *
*/
public void setCd(String value) {
this.cd = value;
}
/**
* Gets the value of the amt property.
*
* @return
* possible object is
* {@link ActiveOrHistoricCurrencyAndAmount }
*
*/
public ActiveOrHistoricCurrencyAndAmount getAmt() {
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\StructuredRegulatoryReporting3.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean existsByEmail(String email) {
return repository.existsByEmail(email);
}
@Override
public boolean existsByUsername(String username) {
return repository.existsByUsername(username);
}
@Override
public Optional<User> findById(long id) {
return repository.find... | @Mapper(config = MappingConfig.class)
interface ToDomainUserMapper extends Converter<UserJdbcEntity, User> {
@Override
User convert(UserJdbcEntity source);
}
@Mapper(config = MappingConfig.class)
interface FromDomainUserMapper extends Converter<User, UserJdbcEntity> {
@Overri... | repos\realworld-backend-spring-master\service\src\main\java\com\github\al\realworld\infrastructure\db\jdbc\UserJdbcRepositoryAdapter.java | 2 |
请完成以下Java代码 | private int getRelativeForegroundColor(final ITable table, final int rowIndexModel)
{
if (colorColumnIndex < 0)
{
return 0;
}
Object data = table.getModelValueAt(rowIndexModel, colorColumnIndex);
int cmp = 0;
// We need to have a Number
if (data == null)
{
return 0;
}
try
{
if (data i... | return 1;
}
return 0;
}
public int getColorColumnIndex()
{
return colorColumnIndex;
}
public void setColorColumnIndex(int colorColumnIndexModel)
{
this.colorColumnIndex = colorColumnIndexModel;
}
public Object getColorDataCompare()
{
return colorDataCompare;
}
public void setColorDataCompare(Ob... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\ui\DefaultTableColorProvider.java | 1 |
请完成以下Java代码 | public void setFind_ID (BigDecimal Find_ID)
{
set_Value (COLUMNNAME_Find_ID, Find_ID);
}
/** Get Find_ID.
@return Find_ID */
public BigDecimal getFind_ID ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Find_ID);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Operation AD_Reference_ID=... | @param Value
Search key for the record in the format required - must be unique
*/
public void setValue (String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Search Key.
@return Search key for the record in the format required - must be unique
*/
public String getValue ()
{
return (Strin... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Find.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<DecisionRequirementsDefinition> executeList(CommandContext commandContext, Page page) {
if (commandContext.getProcessEngineConfiguration().isDmnEnabled()) {
checkQueryOk();
return commandContext
.getDecisionRequirementsDefinitionManager()
.findDecisionRequirements... | public String getDeploymentId() {
return deploymentId;
}
public String getKey() {
return key;
}
public String getKeyLike() {
return keyLike;
}
public String getResourceName() {
return resourceName;
}
public String getResourceNameLike() {
return resourceNameLike;
}
public Int... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionRequirementsDefinitionQueryImpl.java | 2 |
请完成以下Java代码 | private static BooleanWithReason checkAllowReposting(final Document document)
{
if (!document.hasField(WindowConstants.FIELDNAME_Posted))
{
return BooleanWithReason.falseBecause("document has no Posted field");
}
final DocStatus docStatus = getDocStatusOrNull(document);
if (docStatus != null && !docStatu... | if (docStatusField == null)
{
return null;
}
final String docStatusStr = docStatusField.getValueAs(String.class);
return DocStatus.ofNullableCodeOrUnknown(docStatusStr);
}
private static boolean isProcessed(final Document document)
{
final IDocumentFieldView processedField = document.getFieldViewOrNul... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\accounting\process\WEBUI_Fact_Acct_Repost_SingleDocument.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getNVE() {
return nve;
}
/**
* Sets the value of the nve property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNVE(String value) {
this.nve = value;
}
/**
* Gets the value of the gros... | * Gets the value of the grossWeight property.
*
* @return
* possible object is
* {@link UnitType }
*
*/
public UnitType getGrossWeight() {
return grossWeight;
}
/**
* Sets the value of the grossWeight 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\PackagingInformationType.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.