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.joyveb.dbpimpl.cass.prepare.generator.ColumnChangeCqlGenerator.java

protected void setSpecification(ColumnChangeSpecification specification) {
    Assert.notNull(specification);
    this.specification = specification;
}

From source file:net.groupbuy.dao.impl.GoodsDaoImpl.java

/**
 * ?//from  w  ww  .  j  av a 2  s  . co m
 * 
 * @param goods
 *            ?
 */
@Override
public void persist(Goods goods) {
    Assert.notNull(goods);

    if (goods.getProducts() != null) {
        for (Product product : goods.getProducts()) {
            setValue(product);
        }
    }
    super.persist(goods);
}

From source file:net.sf.gazpachoquest.domain.core.QuestionnaireAnswers.java

public void setAnswer(String code, Object answer) {
    Assert.notNull(code);
    getAnswers().put(code.toLowerCase(), answer);
}

From source file:com.smhdemo.common.report.service.ChartService.java

@Override
public Long addChart(Chart vo) {
    Assert.notNull(vo);
    Assert.hasLength(vo.getChartSql());//from  w  ww.j  a  v  a 2s .co  m

    Set<Parameter> parameters = ChartAnalysisUtil.analysisSql(vo.getChartSql());
    vo.setParameters(parameters);

    chartDao.persist(vo);
    return vo.getId();
}

From source file:io.kahu.hawaii.util.exception.ServerException.java

public ServerException(HawaiiServerError error, String message, Throwable throwable) {
    /**/* w  w  w  .  ja  v a2s .c  o  m*/
     * To avoid NPE when calling the super constructor which needs to be the
     * first call in this constructor
     */
    super((error != null ? error.toString() : "") + (message != null ? " - " + message : ""), throwable);
    Assert.notNull(error);
    this.error = error;
}

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

/**
 * copy ctor
 * @param id object to copy from
 */
public Id(Id id) {
    Assert.notNull(id);
    this.nikName = id.nikName;
    this.id = id.id;
}

From source file:com.appdynamics.cloudfoundry.appdservicebroker.provisioning.ProvisioningRequest.java

@JsonCreator
ProvisioningRequest(@JsonProperty("service_id") String serviceId, @JsonProperty("plan_id") String planId,
        @JsonProperty("organization_guid") String organizationGuid,
        @JsonProperty("space_guid") String spaceGuid) {
    Assert.notNull(serviceId);
    Assert.notNull(planId);//from  ww  w . j  a v a  2 s  .  c o m
    Assert.notNull(organizationGuid);
    Assert.notNull(spaceGuid);

    this.serviceId = serviceId;
    this.planId = planId;
    this.organizationGuid = organizationGuid;
    this.spaceGuid = spaceGuid;
}

From source file:de.olivergierke.whoops.account.web.AccountController.java

/**
 * Creates a new {@link AccountController} using the given {@link AccountService}.
 * /*  w  w w  .jav  a2 s. c  o m*/
 * @param accountService must not be {@literal null}.
 */
@Autowired
public AccountController(AccountService accountService) {

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

From source file:org.eclipse.swordfish.core.configuration.ConfigurationInjector.java

public void afterPropertiesSet() throws Exception {
    Assert.notNull(id);
    Assert.notNull(configuration);//from   w w  w .  j a  v  a 2 s .  co m
    LOG.info(String.format("Injecting configuration [%s] for the configurationConsumer with id = [%s] ",
            configuration.toString(), id));
    swordfishContext.getConfigurationService().updateConfiguration(id, configuration);
}

From source file:org.springsource.restbucks.payment.CreditCardPayment.java

/**
 * Creates a new {@link CreditCardPayment} for the given {@link CreditCard} and {@link Order}.
 * /*from   w  w  w .jav a2  s .  c  o m*/
 * @param creditCard must not be {@literal null}.
 * @param order
 */
public CreditCardPayment(CreditCard creditCard, Order order) {

    super(order);
    Assert.notNull(creditCard);
    this.creditCard = creditCard;
}