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.oreilly.springdata.neo4j.order.LineItem.java

public LineItem(Order order, Product product, int amount) {
    Assert.notNull(product);
    Assert.notNull(order);/*  w  w w .  j a  v a2  s . co  m*/

    this.order = order;
    this.product = product;
    this.amount = amount;
}

From source file:de.olivergierke.whoops.customer.web.CustomerController.java

/**
 * Creates a new {@link CustomerController} using the given {@link CustomerService}.
 * //from   www .  ja v  a2  s .c  o m
 * @param customerService must not be {@literal null}.
 */
@Autowired
public CustomerController(CustomerService customerService) {

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

From source file:org.arrow.test.WorkflowTestUtils.java

/**
 * Asserts whether all BPMN entities of the given {@link ProcessInstance}
 * has the state 'SUCCESS'.// w ww .  jav a  2s  .c o m
 * 
 * @param execRepo
 * @param pi
 */
public static void assertSuccessState(ExecutionRepository execRepo, ProcessInstance pi, String[] ids) {

    Set<Execution> executions = execRepo.findByProcessInstance(pi);
    Assert.notNull(executions);

    for (Execution execution : executions) {
        BpmnNodeEntity entity = (BpmnNodeEntity) execution.getEntity();
        State state = execution.getState();

        if (contains(ids, entity.getId())) {
            Assert.isTrue(State.SUCCESS.compareTo(state) == 0);
        }
    }
}

From source file:com.streamreduce.core.dao.AccountDAO.java

public List<User> getUsersForAccount(Account account) {
    Assert.notNull(account);
    return ds.find(User.class, "account", account).asList();
}

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

/**
 * ctor to use with unique id
 * @param id
 */
protected GraphicObjectImpl(Id id) {
    Assert.notNull(id);
    this.id = id;
}

From source file:com.joyveb.dbpimpl.cass.prepare.schema.AbstractSaveOperation.java

protected AbstractSaveOperation(Session session, String tableName, T entity, boolean ifNotExists) {
    super(session);
    Assert.notNull(session);
    Assert.notNull(entity);//from   w w  w. j a v a 2  s  .co  m
    this.session = session;
    this.entity = entity;
    this.tableName = tableName;
    this.ifNotExists = ifNotExists;
}

From source file:com.alibaba.otter.node.etl.common.pipe.impl.http.RemoteUrlBuilder.java

public void afterPropertiesSet() throws Exception {
    Assert.notNull(configClientService);
    Assert.notNull(urlFormat);
}

From source file:com.frank.search.solr.repository.support.SolrEntityInformationCreatorImpl.java

public SolrEntityInformationCreatorImpl(
        MappingContext<? extends SolrPersistentEntity<?>, SolrPersistentProperty> mappingContext) {
    Assert.notNull(mappingContext);
    this.mappingContext = mappingContext;
}

From source file:security.LoginController.java

@RequestMapping("/login")
public ModelAndView login(@Valid @ModelAttribute Credentials credentials, BindingResult bindingResult,
        @RequestParam(required = false) boolean showError) {
    Assert.notNull(credentials);
    Assert.notNull(bindingResult);/* w w w  .j a va2s .  co  m*/

    ModelAndView result;

    result = new ModelAndView("security/login");
    result.addObject("credentials", credentials);
    result.addObject("showError", showError);

    return result;
}

From source file:com.weasel.elasticsearch.core.query.AbstractQuery.java

@SuppressWarnings("unchecked")
@Override//from  w  w w  .  j a v  a2 s  .com
public final <T extends Query> T setPageable(Page<?> pageable) {
    Assert.notNull(pageable);
    this.pageable = pageable;
    return (T) this;
}