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:pl.konczak.mystartupapp.sharedkernel.enversRepository.DefaultRevisionMetadata.java

/**
 * Creates a new {@link DefaultRevisionMetadata}.
 * /*ww  w .j  a v  a 2 s  .  c o  m*/
 * @param entity must not be {@literal null}.
 */
public DefaultRevisionMetadata(DefaultRevisionEntity entity) {

    Assert.notNull(entity);
    this.entity = entity;
}

From source file:com.nmote.xr.spring.XRSpringExporter.java

public void setServers(List<XRExportDef<?>> servers) {
    Assert.notNull(servers);
    Assert.notEmpty(servers);
    this.servers = servers;
}

From source file:org.lightadmin.core.config.domain.scope.DefaultScopesConfigurationUnit.java

DefaultScopesConfigurationUnit(Class<?> domainType, final List<ScopeMetadata> scopesMetadata) {
    super(domainType);

    Assert.notNull(scopesMetadata);

    this.scopesMetadata = newLinkedList(scopesMetadata);
}

From source file:de.olivergierke.whoops.account.AccountServiceImpl.java

/**
 * Creates a new {@link AccountServiceImpl} using the given {@link AccountRepository}.
 * // w w  w  .j  a  v a 2  s . c  om
 * @param repository must not be {@literal null}.
 */
@Autowired
public AccountServiceImpl(AccountRepository repository) {

    Assert.notNull(repository);
    this.repository = repository;
}

From source file:io.kahu.hawaii.util.call.log.CallLoggerImpl.java

public CallLoggerImpl(LogManager logManager, RequestLogger requestLogger, ResponseLogger<T> responseLogger) {
    Assert.notNull(logManager);
    this.logManager = logManager;
    this.requestLogger = requestLogger;
    this.responseLogger = responseLogger;
}

From source file:org.jcf.graphicMessage.GraphicObjectFactory.java

/**
 * creating new PointImpl object with new id and new Location
 * @param nikName Nikname inside room//from  www.  j a  va 2s  .c om
 * @param room name of the room
 * @param loc Location instance
 * @return new created PointImpl object
 */
public static Point createPoint(String nikName, String room, Location loc) {
    Assert.hasLength(nikName);
    Assert.hasLength(room);
    Assert.notNull(loc);

    Id id = IdFactory.getNextId(room, nikName);
    Point p = new PointImpl(id);
    p.addLocation(loc);
    return p;
}

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

public CompositePrimaryKey(Entity entity, List<Attribute> attributes) {
    super(entity, ClassType.primaryKey);
    Assert.notNull(entity);
    Assert.isTrue(attributes.size() > 1, "Composite PK must have at least 2 attributes");
    for (Attribute attribute : attributes) {
        attribute.setInCpk(true);//  w w  w  .  j ava 2  s.c o m
    }
    this.attributes = unmodifiableList(attributes);
    this.entity = entity;
}

From source file:com.verigreen.jgit.TestJGitOperator.java

@Test
public void testGetRevCommit() {

    JGitOperator jgitOp = new JGitOperator(_repoName);
    RevCommit revCommit = jgitOp.getRevCommit(_commitId);
    System.out.println("committer =" + revCommit.getCommitterIdent());
    Assert.notNull(revCommit);
}

From source file:com.dianping.lion.util.BeanUtils.java

public static Field[] getDeclaredFields(Class<?> clazz) {
    Assert.notNull(clazz);
    Field[] fields = clazz.getDeclaredFields();
    for (Class<?> superClass = clazz; superClass != Object.class; superClass = superClass.getSuperclass()) {
        fields = (Field[]) ArrayUtils.addAll(fields, superClass.getDeclaredFields());
    }// www. j a  v a2  s . co  m
    return fields;
}

From source file:org.synyx.hades.dao.query.ParameterBinder.java

/**
 * Creates a new {@link ParameterBinder}.
 * // ww w . jav  a 2s .c  om
 * @param parameters
 * @param values
 */
public ParameterBinder(Parameters parameters, Object... values) {

    Assert.notNull(parameters);
    Assert.notNull(values);

    Assert.isTrue(parameters.getNumberOfParameters() == values.length, "Invalid number of parameters given!");

    this.parameters = parameters;
    this.values = values;
}