method2testcases stringlengths 118 6.63k |
|---|
### Question:
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteJob(UUID jobId) throws AlertDatabaseConstraintException { if (jobId == null) { throw new AlertDatabaseConstraintException(NULL_JOB_ID); } List<Long> configIdsForJob = configGroupRepository .findByJobId(jobId) .stre... |
### Question:
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public Optional<ConfigurationModel> getConfigurationById(Long id) throws AlertDatabaseConstraintException { if (id == null) { throw new AlertDatabaseConstraintException(NULL_CONFIG_ID); } Optional<DescriptorConfigEntity> optionalDes... |
### Question:
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderProject> getProjectsByProviderConfigId(Long providerConfigId) { return providerProjectRepository.findByProviderConfigId(providerConfigId) .strea... |
### Question:
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public List<ConfigurationModel> getConfigurationsByDescriptorNameAndContext(String descriptorName, ConfigContextEnum context) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(descriptorName)) { throw new AlertDataba... |
### Question:
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override public void deleteProjects(Collection<ProviderProject> providerProjects) { providerProjects.forEach(project -> providerProjectRepository.deleteByHref(project.getHref())); } @Autowired DefaultProviderDataAccessor(ProviderProjectReposi... |
### Question:
DefaultConfigurationAccessor implements ConfigurationAccessor { @Override public void deleteConfiguration(ConfigurationModel configModel) throws AlertDatabaseConstraintException { if (configModel == null) { throw new AlertDatabaseConstraintException("Cannot delete a null object from the database"); } dele... |
### Question:
DefaultConfigurationAccessor implements ConfigurationAccessor { private String decrypt(String value, boolean shouldDecrypt) { if (shouldDecrypt && value != null) { return encryptionUtility.decrypt(value); } return value; } @Autowired DefaultConfigurationAccessor(RegisteredDescriptorRepository registeredD... |
### Question:
DefaultAuditAccessor implements AuditAccessor { @Override public Optional<Long> findMatchingAuditId(Long notificationId, UUID commonDistributionId) { return auditEntryRepository.findMatchingAudit(notificationId, commonDistributionId).map(AuditEntryEntity::getId); } @Autowired DefaultAuditAccessor(AuditEn... |
### Question:
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Set<String> getEmailAddressesForProjectHref(String projectHref) { Optional<Long> projectId = providerProjectRepository.findFirstByHref(projectHref).map(Provi... |
### Question:
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntrySuccess(Collection<Long> auditEntryIds) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(auditEntryId); if (auditEntryEntit... |
### Question:
DefaultAuditAccessor implements AuditAccessor { @Override @Transactional public void setAuditEntryFailure(Collection<Long> auditEntryIds, String errorMessage, Throwable t) { for (Long auditEntryId : auditEntryIds) { try { Optional<AuditEntryEntity> auditEntryEntityOptional = auditEntryRepository.findById(... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> saveAllNotifications(Collection<AlertNotificationModel> notifications) { List<NotificationEntity> entitiesToSave = notifications .stream() .map(this::fromModel) .collect(Collectors.toList()); List<A... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Page<AlertNotificationModel> findAllWithSearch(String searchTerm, PageRequest pageRequest, boolean onlyShowSentNotifications) { String lcSearchTerm = searchTerm.toLowe... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByIds(List<Long> notificationIds) { return toModels(notificationContentRepository.findAllById(notificationIds)); } @Autowire... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public Optional<AlertNotificationModel> findById(Long notificationId) { return notificationContentRepository.findById(notificationId).map(this::toModel); } @Autowir... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBetween(OffsetDateTime startDate, OffsetDateTime endDate) { List<NotificationEntity> byCreatedAtBetween = notific... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<AlertNotificationModel> findByCreatedAtBefore(OffsetDateTime date) { List<NotificationEntity> byCreatedAtBefore = notificationContentRepository.findByCr... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Override public List<AlertNotificationModel> findByCreatedAtBeforeDayOffset(int dayOffset) { OffsetDateTime searchTime = DateUtils.createCurrentDateTimestamp() .minusDays(dayOffset) .withHour(0).withMinute(0).withSecond(0).withNano(0); return ... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { @Override public void deleteNotificationList(List<AlertNotificationModel> notifications) { notifications.forEach(this::deleteNotification); } @Autowired DefaultNotificationAccessor(NotificationContentRepository notificationContentRepository, A... |
### Question:
DefaultNotificationAccessor implements NotificationAccessor { public PageRequest getPageRequestForNotifications(Integer pageNumber, Integer pageSize, String sortField, String sortOrder) { Integer page = ObjectUtils.defaultIfNull(pageNumber, 0); Integer size = ObjectUtils.defaultIfNull(pageSize, Integer.MA... |
### Question:
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public List<CustomCertificateModel> getCertificates() { return customCertificateRepository.findAll() .stream() .map(this::createModel) .collect(Collectors.toList()); } @Autowired DefaultCustomCertificateAccessor(CustomCerti... |
### Question:
DefaultProviderDataAccessor implements ProviderDataAccessor { @Override @Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED) public List<ProviderUserModel> getUsersByProviderConfigId(Long providerConfigId) { if (null == providerConfigId) { return List.of(); } return providerUserRepository... |
### Question:
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public Optional<CustomCertificateModel> getCertificate(Long id) { return customCertificateRepository.findById(id) .map(this::createModel); } @Autowired DefaultCustomCertificateAccessor(CustomCertificateRepository customCert... |
### Question:
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public CustomCertificateModel storeCertificate(CustomCertificateModel certificateModel) throws AlertDatabaseConstraintException { if (null == certificateModel) { throw new AlertDatabaseConstraintException("The certificate mo... |
### Question:
DefaultCustomCertificateAccessor implements CustomCertificateAccessor { @Override public void deleteCertificate(String certificateAlias) throws AlertDatabaseConstraintException { if (StringUtils.isBlank(certificateAlias)) { throw new AlertDatabaseConstraintException("The field 'certificateAlias' cannot be... |
### Question:
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public boolean isSystemInitialized() { return getSystemStatus().isInitialConfigurationPerformed(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boole... |
### Question:
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void setSystemInitialized(boolean systemInitialized) { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemInitialized, systemStatus.getStartupTi... |
### Question:
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public void startupOccurred() { SystemStatusEntity systemStatus = getSystemStatus(); SystemStatusEntity newSystemStatus = new SystemStatusEntity(systemStatus.isInitialConfigurationPerformed(), createCurrentDateTimestamp... |
### Question:
DefaultSystemStatusAccessor implements SystemStatusAccessor { @Override @Transactional public OffsetDateTime getStartupTime() { return getSystemStatus().getStartupTime(); } @Autowired DefaultSystemStatusAccessor(SystemStatusRepository systemStatusRepository); @Override @Transactional boolean isSystemInit... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public Set<UserRoleModel> getRoles() { List<RoleEntity> roleList = roleRepository.findAll(); Set<UserRoleModel> userRoles = new LinkedHashSet<>(); for (RoleEntity entity : roleList) { userRoles.add(new UserRoleModel(entity.getId(), entity.getRoleName... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public boolean doesRoleNameExist(String name) { return roleRepository.existsRoleEntityByRoleName(name); } @Autowired DefaultRoleAccessor(RoleRepository roleRepository, UserRoleRepository userRoleRepository, PermissionMatrixRepository permissionMatri... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRole(String roleName) throws AlertDatabaseConstraintException { RoleEntity dbRole = createRole(roleName, true); return UserRoleModel.of(dbRole.getRoleName(), dbRole.getCustom()); } @Autowired DefaultRoleAccessor(RoleReposi... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public UserRoleModel createRoleWithPermissions(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = createRole(roleName, true); List<PermissionMatrixRelation> permissions = updateR... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public void updateRoleName(Long roleId, String roleName) throws AlertDatabaseConstraintException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtil... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public PermissionMatrixModel updatePermissionsForRole(String roleName, PermissionMatrixModel permissionMatrix) throws AlertDatabaseConstraintException { RoleEntity roleEntity = roleRepository.findByRoleName(roleName) .orElseThrow(() -> new AlertDatab... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public void deleteRole(Long roleId) throws AlertForbiddenOperationException { Optional<RoleEntity> foundRole = roleRepository.findById(roleId); if (foundRole.isPresent()) { RoleEntity roleEntity = foundRole.get(); if (BooleanUtils.isFalse(roleEntity.... |
### Question:
DefaultRoleAccessor implements RoleAccessor { @Override public void updateUserRoles(Long userId, Collection<UserRoleModel> roles) { if (null != userId) { userRoleRepository.deleteAllByUserId(userId); if (null != roles && !roles.isEmpty()) { Collection<String> roleNames = roles.stream().map(UserRoleModel::... |
### Question:
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationTypeDetails> getAuthenticationTypeDetails(AuthenticationType authenticationType) { Optional<AuthenticationTypeEntity> authenticationTypeEntity = authenticationTypeRepository.findById(authentic... |
### Question:
DefaultAuthenticationTypeAccessor implements AuthenticationTypeAccessor { @Override public Optional<AuthenticationType> getAuthenticationType(Long id) { return AuthenticationType.getById(id); } @Autowired DefaultAuthenticationTypeAccessor(AuthenticationTypeRepository authenticationTypeRepository); @Overr... |
### Question:
DefaultProviderTaskPropertiesAccessor implements ProviderTaskPropertiesAccessor { @Override public Optional<String> getTaskProperty(String taskName, String propertyKey) { if (StringUtils.isBlank(taskName) || StringUtils.isBlank(propertyKey)) { return Optional.empty(); } return providerTaskPropertiesReposi... |
### Question:
Author extends AbstractNode { @Override public int hashCode() { final int prime = 31; int result = 1; result += prime * result + ((this.firstInitial == null) ? 0 : this.firstInitial.hashCode()); result += prime * result + ((this.lastName == null) ? 0 : this.lastName.hashCode()); return result; } Author(St... |
### Question:
Author extends AbstractNode { public String getFirstName() { return this.firstName; } Author(String rawAuthorText, int origin); Author(String rawAuthorText, int origin, IncitesInstitutionLocationMap locationMap); void addInstitution(String institution); void addPublication(Publication publication); doubl... |
### Question:
linkedList { public linkedList() { start = null; end = null; size = 0; } linkedList(); boolean isEmpty(); int getSize(); void insertAtStart(int val); void insertAtEnd(int val); void insertAtPos(int val , int pos); void deleteAtPos(int pos); void display(); public int size; }### Answer:
@Test public void t... |
### Question:
DatabaseConnectionDialog { public void registerClass( String key, String className ) { extendedClasses.put( key, className ); } DatabaseConnectionDialog(); void registerClass( String key, String className ); XulDomContainer getSwtInstance( Shell shell ); XulDomContainer getSwtInstance( SwtXulLoader loader... |
### Question:
Utils { public static boolean isEmpty( CharSequence val ) { return val == null || val.length() == 0; } static int getDamerauLevenshteinDistance( String s, String t ); static boolean isEmpty( CharSequence val ); static boolean isEmpty( CharSequence[] strings ); static boolean isEmpty( Object[] array ); st... |
### Question:
Utils { public static String resolvePassword( VariableSpace variables, String password ) { String resolvedPassword = variables.environmentSubstitute( password ); if ( resolvedPassword != null ) { return Encr.decryptPasswordOptionallyEncrypted( resolvedPassword ); } else { return resolvedPassword; } } sta... |
### Question:
SessionConfigurator extends ClientEndpointConfig.Configurator { @Override public void beforeRequest( Map<String, List<String>> headers ) { if ( withAuth ) { Header authenticationHeader = getAuthenticationHeader( url ); if ( authenticationHeader != null ) { headers .put( authenticationHeader.getName(), Col... |
### Question:
DatabaseConnectionPoolParameter { public static final List<RowMetaAndData> getRowList( DatabaseConnectionPoolParameter[] poolParameters, String titleParameter, String titleDefaultValue, String titleDescription ) { RowMetaInterface rowMeta = new RowMeta(); rowMeta.addValueMeta( new ValueMetaString( titlePa... |
### Question:
DatabaseLogExceptionFactory { public static LogExceptionBehaviourInterface getExceptionStrategy( LogTableCoreInterface table ) { return getExceptionStrategy( table, null ); } static LogExceptionBehaviourInterface getExceptionStrategy( LogTableCoreInterface table ); static LogExceptionBehaviourInterface g... |
### Question:
DatabaseUtil implements DataSourceProviderInterface { @Override public DataSource getNamedDataSource( String datasourceName ) throws DataSourceNamingException { ClassLoader original = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( getClass().getClassLoa... |
### Question:
RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta { @Override public int getDefaultDatabasePort() { if ( getAccessType() == DatabaseMeta.TYPE_ACCESS_NATIVE ) { return 5439; } return -1; } RedshiftDatabaseMeta(); @Override int getDefaultDatabasePort(); @Override String getDriverClass(); @Override String ... |
### Question:
RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta { @Override public String getDriverClass() { if ( getAccessType() == DatabaseMeta.TYPE_ACCESS_ODBC ) { return "sun.jdbc.odbc.JdbcOdbcDriver"; } else { return "com.amazon.redshift.jdbc4.Driver"; } } RedshiftDatabaseMeta(); @Override int getDefaultDatabase... |
### Question:
MessageEventService { public final void addHandler( final Message eventType, final MessageEventHandler handler ) throws HandlerRegistrationException { if ( handler != null && eventType != null ) { addHandlerFor( eventType, handler ); } else { throw new HandlerRegistrationException( "One of the parameters ... |
### Question:
RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta { @Override public String getURL( String hostname, String port, String databaseName ) { if ( getAccessType() == DatabaseMeta.TYPE_ACCESS_ODBC ) { return "jdbc:odbc:" + databaseName; } else { return "jdbc:redshift: } } RedshiftDatabaseMeta(); @Override in... |
### Question:
RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta { @Override public String getExtraOptionsHelpText() { return "http: } RedshiftDatabaseMeta(); @Override int getDefaultDatabasePort(); @Override String getDriverClass(); @Override String getURL( String hostname, String port, String databaseName ); @Overri... |
### Question:
RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta { @Override public boolean isFetchSizeSupported() { return false; } RedshiftDatabaseMeta(); @Override int getDefaultDatabasePort(); @Override String getDriverClass(); @Override String getURL( String hostname, String port, String databaseName ); @Override... |
### Question:
RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta { @Override public boolean supportsSetMaxRows() { return false; } RedshiftDatabaseMeta(); @Override int getDefaultDatabasePort(); @Override String getDriverClass(); @Override String getURL( String hostname, String port, String databaseName ); @Override S... |
### Question:
RedshiftDatabaseMeta extends PostgreSQLDatabaseMeta { @Override public String[] getUsedLibraries() { return new String[] { "RedshiftJDBC4_1.0.10.1010.jar" }; } RedshiftDatabaseMeta(); @Override int getDefaultDatabasePort(); @Override String getDriverClass(); @Override String getURL( String hostname, Strin... |
### Question:
MessageEventService { public final boolean hasHandlers( final Message eventType ) { return containsHandlerFor( eventType ); } MessageEventService(); void fireEvent( final Message event ); final void addHandler( final Message eventType, final MessageEventHandler handler ); final boolean hasHandlers( final ... |
### Question:
ConnectionPoolUtil { public static Connection getConnection( LogChannelInterface log, DatabaseMeta dbMeta, String partitionId ) throws Exception { return getConnection( log, dbMeta, partitionId, dbMeta.getInitialPoolSize(), dbMeta.getMaximumPoolSize() ); } static Connection getConnection( LogChannelInter... |
### Question:
ConnectionPoolUtil { protected static String buildPoolName( DatabaseMeta dbMeta, String partitionId ) { return dbMeta.getName() + Const.NVL( dbMeta.getDatabaseName(), "" ) + Const.NVL( dbMeta.getHostname(), "" ) + Const.NVL( dbMeta.getDatabasePortNumberString(), "" ) + Const.NVL( partitionId, "" ); } sta... |
### Question:
ConnectionPoolUtil { @VisibleForTesting static void configureDataSource( BasicDataSource ds, DatabaseMeta databaseMeta, String partitionId, int initialSize, int maximumSize ) throws KettleDatabaseException { Properties connectionPoolProperties = new Properties( databaseMeta.getConnectionPoolingProperties(... |
### Question:
HypersonicDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getSQLSequenceExists( String sequenceName ) { return "SELECT * FROM INFORMATION_SCHEMA.SYSTEM_SEQUENCES WHERE SEQUENCE_NAME = '" + sequenceName + "'"; } @Override int[] getAccessTypeList(); @Override in... |
### Question:
HypersonicDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getSQLCurrentSequenceValue( String sequenceName ) { return "SELECT " + sequenceName + ".currval FROM INFORMATION_SCHEMA.SYSTEM_SEQUENCES WHERE SEQUENCE_NAME = '" + sequenceName + "'"; } @Override int[] ... |
### Question:
HypersonicDatabaseMeta extends BaseDatabaseMeta implements DatabaseInterface { @Override public String getSQLNextSequenceValue( String sequenceName ) { return "SELECT NEXT VALUE FOR " + sequenceName + " FROM INFORMATION_SCHEMA.SYSTEM_SEQUENCES WHERE SEQUENCE_NAME = '" + sequenceName + "'"; } @Override in... |
### Question:
SqlCommentScrubber { public static String removeComments( String text ) { if ( text == null ) { return null; } StringBuilder queryWithoutComments = new StringBuilder(); boolean blkComment = false; boolean lineComment = false; boolean inString = false; StringReader buffer = new StringReader( text ); int ch... |
### Question:
InfobrightDatabaseMeta extends MySQLDatabaseMeta implements DatabaseInterface { @Override public int getDefaultDatabasePort() { if ( getAccessType() == DatabaseMeta.TYPE_ACCESS_NATIVE ) { return 5029; } return -1; } @Override int getDefaultDatabasePort(); @Override void addDefaultOptions(); }### Answer:... |
### Question:
SvgSupport { public static boolean isSvgEnabled() { return true; } static boolean isSvgEnabled(); static SvgImage loadSvgImage( InputStream in ); static boolean isSvgName( String name ); static String toPngName( String name ); static boolean isPngName( String name ); static String toSvgName( String name ... |
### Question:
SvgSupport { public static SvgImage loadSvgImage( InputStream in ) throws Exception { Document document = getSvgFactory().createDocument( null, in ); return new SvgImage( document ); } static boolean isSvgEnabled(); static SvgImage loadSvgImage( InputStream in ); static boolean isSvgName( String name ); ... |
### Question:
DataHandler extends AbstractXulEventHandler { public void getOptionHelp() { String message = null; DatabaseMeta database = new DatabaseMeta(); getInfo( database ); String url = database.getExtraOptionsHelpText(); if ( ( url == null ) || ( url.trim().length() == 0 ) ) { message = Messages.getString( "DataH... |
### Question:
SvgSupport { public static String toPngName( String name ) { if ( isSvgName( name ) ) { name = name.substring( 0, name.length() - 4 ) + PNG_EXTENSION; } return name; } static boolean isSvgEnabled(); static SvgImage loadSvgImage( InputStream in ); static boolean isSvgName( String name ); static String toP... |
### Question:
SvgSupport { public static String toSvgName( String name ) { if ( isPngName( name ) ) { name = name.substring( 0, name.length() - 4 ) + SVG_EXTENSION; } return name; } static boolean isSvgEnabled(); static SvgImage loadSvgImage( InputStream in ); static boolean isSvgName( String name ); static String toP... |
### Question:
SvgImage { public Document getDocument() { return document; } protected SvgImage( Document doc ); Document getDocument(); }### Answer:
@Test public void testGetDocument() throws Exception { assertEquals( document, image.getDocument() ); } |
### Question:
LogMessage implements LogMessageInterface { @Override @Deprecated public String toString() { if ( message == null ) { return subject; } if ( arguments != null && arguments.length > 0 ) { return subject + " - " + MessageFormat.format( message, arguments ); } else { return subject + " - " + message; } } Log... |
### Question:
KettleLogLayout { public String format( KettleLoggingEvent event ) { StringBuilder line = new StringBuilder(); String dateTimeString = ""; if ( timeAdded ) { dateTimeString = LOCAL_SIMPLE_DATE_PARSER.get().format( new Date( event.timeStamp ) ) + " - "; } Object object = event.getMessage(); if ( object ins... |
### Question:
LoggingObject implements LoggingObjectInterface { @Override public boolean equals( Object obj ) { if ( !( obj instanceof LoggingObject ) ) { return false; } if ( obj == this ) { return true; } try { LoggingObject loggingObject = (LoggingObject) obj; boolean sameCarteFamily = ( getContainerObjectId() == nu... |
### Question:
MetricsRegistry { public Map<String, Queue<MetricsSnapshotInterface>> getSnapshotLists() { return snapshotLists; } private MetricsRegistry(); static MetricsRegistry getInstance(); void addSnapshot( LogChannelInterface logChannel, MetricsSnapshotInterface snapshot ); Map<String, Queue<MetricsSnapshotInter... |
### Question:
JndiUtil { public static void initJNDI() throws KettleException { String path = Const.JNDI_DIRECTORY; if ( path == null || path.equals( "" ) ) { try { File file = new File( "simple-jndi" ); path = file.getCanonicalPath(); } catch ( Exception e ) { throw new KettleException( "Error initializing JNDI", e );... |
### Question:
ExtensionPointMap { public void addExtensionPoint( PluginInterface extensionPointPlugin ) { lock.writeLock().lock(); try { for ( String id : extensionPointPlugin.getIds() ) { extensionPointPluginMap.put( extensionPointPlugin.getName(), id, createLazyLoader( extensionPointPlugin ) ); } } finally { lock.wri... |
### Question:
ExtensionPointHandler { public static void callExtensionPoint( final LogChannelInterface log, final String id, final Object object ) throws KettleException { ExtensionPointMap.getInstance().callExtensionPoint( log, id, object ); } static void callExtensionPoint( final LogChannelInterface log, final Strin... |
### Question:
Encr { public static final String encryptPassword( String password ) { return encoder.encode( password, false ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static fin... |
### Question:
Encr { public static final String decryptPassword( String encrypted ) { return encoder.decode( encrypted ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Deprecated static final St... |
### Question:
Encr { public static final String encryptPasswordIfNotUsingVariables( String password ) { return encoder.encode( password, true ); } Encr(); @Deprecated boolean init(); static void init( String encoderPluginId ); @Deprecated static final boolean checkSignatureShort( String signature, String verify ); @Dep... |
### Question:
CertificateGenEncryptUtil { public static Key generateSingleKey() throws NoSuchAlgorithmException { Key key = KeyGenerator.getInstance( SINGLE_KEY_ALGORITHM ).generateKey(); return key; } static KeyPair generateKeyPair(); static Key generateSingleKey(); static byte[] encodeKeyForTransmission( Key encodin... |
### Question:
KettleTwoWayPasswordEncoder implements TwoWayPasswordEncoderInterface { @Override public String encode( String rawPassword ) { return encode( rawPassword, true ); } KettleTwoWayPasswordEncoder(); @Override void init(); @Override String encode( String rawPassword ); @Override String encode( String rawPassw... |
### Question:
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRow( RowMetaInterface rowMeta, Object[] rowData ) { this.rowMeta = rowMeta; buffer.add( rowData ); return true; } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override O... |
### Question:
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public boolean putRowWait( RowMetaInterface rowMeta, Object[] rowData, long time, TimeUnit tu ) { return putRow( rowMeta, rowData ); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Overrid... |
### Question:
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public Object[] getRowImmediate() { return getRow(); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRowWait( long timeout, TimeUnit tu ); @Override boolean putRow( Ro... |
### Question:
QueueRowSet extends BaseRowSet implements Comparable<RowSet>, RowSet { @Override public int size() { return buffer.size(); } QueueRowSet(); @Override Object[] getRow(); @Override Object[] getRowImmediate(); @Override Object[] getRowWait( long timeout, TimeUnit tu ); @Override boolean putRow( RowMetaInterf... |
### Question:
RowMeta implements RowMetaInterface { @Override public List<ValueMetaInterface> getValueMetaList() { List<ValueMetaInterface> copy; lock.readLock().lock(); try { copy = new ArrayList<ValueMetaInterface>( valueMetaList ); } finally { lock.readLock().unlock(); } return Collections.unmodifiableList( copy ); ... |
### Question:
RowMeta implements RowMetaInterface { @Override public boolean exists( ValueMetaInterface meta ) { return ( meta != null ) && searchValueMeta( meta.getName() ) != null; } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> valueMetaList, RowMetaCa... |
### Question:
RowMeta implements RowMetaInterface { @Override public ValueMetaInterface getValueMeta( int index ) { lock.readLock().lock(); try { if ( ( index >= 0 ) && ( index < valueMetaList.size() ) ) { return valueMetaList.get( index ); } else { return null; } } finally { lock.readLock().unlock(); } } RowMeta(); pr... |
### Question:
RowMeta implements RowMetaInterface { @Override public void addRowMeta( RowMetaInterface rowMeta ) { for ( int i = 0; i < rowMeta.size(); i++ ) { addValueMeta( rowMeta.getValueMeta( i ) ); } } RowMeta(); private RowMeta( RowMeta rowMeta, Integer targetType ); private RowMeta( List<ValueMetaInterface> va... |
### Question:
RowMeta implements RowMetaInterface { @Override public String[] getFieldNames() { lock.readLock().lock(); try { String[] retval = new String[ size() ]; for ( int i = 0; i < size(); i++ ) { String valueName = getValueMeta( i ).getName(); retval[i] = valueName == null ? "" : valueName; } return retval; } fi... |
### Question:
ValueMetaTimestamp extends ValueMetaDate { @Override public void setPreparedStatementValue( DatabaseMeta databaseMeta, PreparedStatement preparedStatement, int index, Object data ) throws KettleDatabaseException { try { if ( data != null ) { preparedStatement.setTimestamp( index, getTimestamp( data ) ); }... |
### Question:
ValueMetaTimestamp extends ValueMetaDate { public int compare( Object data1, Object data2 ) throws KettleValueException { Timestamp timestamp1 = getTimestamp( data1 ); Timestamp timestamp2 = getTimestamp( data2 ); int cmp = 0; if ( timestamp1 == null ) { if ( timestamp2 == null ) { cmp = 0; } else { cmp =... |
### Question:
ValueMetaTimestamp extends ValueMetaDate { protected synchronized Timestamp convertStringToTimestamp( String string ) throws KettleValueException { string = Const.trimToType( string, getTrimType() ); if ( Utils.isEmpty( string ) ) { return null; } Timestamp returnValue; try { returnValue = Timestamp.value... |
### Question:
ValueMetaTimestamp extends ValueMetaDate { protected synchronized String convertTimestampToString( Timestamp timestamp ) throws KettleValueException { if ( timestamp == null ) { return null; } return getDateFormat().format( timestamp ); } ValueMetaTimestamp(); ValueMetaTimestamp( String name ); @Override... |
### Question:
ValueMetaTimestamp extends ValueMetaDate { public Timestamp convertDateToTimestamp( Date date ) throws KettleValueException { if ( date == null ) { return null; } Timestamp result = null; if ( date instanceof Timestamp ) { result = (Timestamp) date; } else { result = new Timestamp( date.getTime() ); } ret... |
### Question:
ValueMetaInternetAddress extends ValueMetaDate { @Override public int compare( Object data1, Object data2 ) throws KettleValueException { InetAddress inet1 = getInternetAddress( data1 ); InetAddress inet2 = getInternetAddress( data2 ); int cmp = 0; if ( inet1 == null ) { if ( inet2 == null ) { cmp = 0; } ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.