Example usage for org.springframework.util Assert notNull

List of usage examples for org.springframework.util Assert notNull

Introduction

In this page you can find the example usage for org.springframework.util Assert notNull.

Prototype

@Deprecated
public static void notNull(@Nullable Object object) 

Source Link

Document

Assert that an object is not null .

Usage

From source file:com.jaxio.celerio.model.primarykey.NoPrimaryKey.java

public NoPrimaryKey(Entity entity) {
    Assert.notNull(entity);
    this.entity = entity;
}

From source file:org.zalando.spring.data.businesskey.config.BusinessKeyHandler.java

public void setKeyGenerator(final BusinessKeyGenerator keygenerator) {
    Assert.notNull(keygenerator);
    this.keyGenerator = keygenerator;
}

From source file:se.vgregion.mobile.types.ErrorReport.java

public ErrorReport(Printer printer, PrinterQueue queue, String reporter, String description) {
    Assert.notNull(printer);
    Assert.hasText(description);//  www .j  ava 2s  .  c  o  m

    this.id = UUID.randomUUID();
    this.printer = printer;
    this.queue = queue;
    this.reporter = reporter;
    this.description = description;
}

From source file:net.eusashead.spring.gaecache.GaeCacheKey.java

public GaeCacheKey(ArgumentHash[] args) {
    Assert.notNull(args);
    Assert.notEmpty(args);
    Assert.noNullElements(args);
    this.hashes = args;
}

From source file:kr.okplace.job.support.HeaderCopyCallback.java

public void handleLine(String line) {
    Assert.notNull(line);
    this.header = line;
}

From source file:org.oncoblocks.centromere.sql.sqlbuilder.ComplexTableDescription.java

public ComplexTableDescription(String tableName, List<String> idColumns, String selectClause, String fromClause,
        String groupByClause) {//  w  w w  . jav  a 2  s.  com

    Assert.notNull(tableName);
    Assert.notNull(idColumns);
    Assert.notNull(selectClause);
    Assert.notNull(fromClause);
    Assert.notNull(groupByClause);

    this.tableName = tableName;
    this.idColumns = idColumns;
    this.selectClause = selectClause;
    this.fromClause = fromClause;
    this.groupByClause = groupByClause;

}

From source file:org.eclipse.swordfish.core.test.util.base.BaseOsgiTestCase.java

@Override
protected void onTearDown() throws Exception {
    Assert.notNull(regirstrationsToCancel);
    for (ServiceRegistration serviceRegistration : regirstrationsToCancel) {
        try {//  w ww  .  jav  a 2 s  . c  o  m
            serviceRegistration.unregister();
        } catch (IllegalStateException ex) {
            LOG.error("Unregistering service exception", ex);
        }
    }
    regirstrationsToCancel.clear();
    super.onTearDown();
}

From source file:security.LoginService.java

public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
    Assert.notNull(username);

    UserDetails result;/*from ww w . j  a  v  a2s . c om*/

    result = userRepository.findByUsername(username);
    Assert.notNull(result);
    // WARNING: The following sentences prevent lazy initialisation problems!
    Assert.notNull(result.getAuthorities());
    result.getAuthorities().size();

    return result;
}

From source file:com.frank.search.solr.core.query.result.HighlightEntry.java

/**
 * @param entity must not be null
 */
public HighlightEntry(T entity) {
    Assert.notNull(entity);
    this.entity = entity;
}

From source file:com.iterzp.momo.utils.RSAUtils.java

/**
 * /*from ww w  .  j  a  va 2  s.com*/
 * 
 * @param publicKey
 *            
 * @param text
 *            
 * 
 * @return Base64?
 */
public static String encrypt(PublicKey publicKey, String text) {
    Assert.notNull(publicKey);
    Assert.notNull(text);
    byte[] data = encrypt(publicKey, text.getBytes());
    return data != null ? Base64.encodeBase64String(data) : null;
}