热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

leap.lang.Args.notNull()方法的使用及代码示例

本文整理了Java中leap.lang.Args.notNull()方法的一些代码示例,展示了Args.notNull()的具体用法。这些代码

本文整理了Java中leap.lang.Args.notNull()方法的一些代码示例,展示了Args.notNull()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Args.notNull()方法的具体详情如下:
包路径:leap.lang.Args
类名称:Args
方法名:notNull

Args.notNull介绍

[英]Ensures that an object reference passed as a parameter to the calling method is not null.
[中]确保作为参数传递给调用方法的对象引用不为null。

代码示例

代码示例来源:origin: org.leapframework/leap-orm

public MapWrapper(EntityMapping mapping, Map map) {
super(mapping, map);
Args.notNull(map,"fields");
this.map = map;
}

代码示例来源:origin: org.leapframework/leap-core

@Override
public void setExtension(Class type, T extension) {
Args.notNull(type);
Args.notNull(extension);
config.extensions.put(type, extension);
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public EntityMapping tryGetEntityMapping(String entityName) {
Args.notNull(entityName,"entity name");
return nameToEntityMappings.get(entityName.toLowerCase());
}

代码示例来源:origin: org.leapframework/leap-core

@Override
public void setExtension(T extension) {
Args.notNull(extension);
config.extensions.put(extension.getClass(), extension);
}

代码示例来源:origin: org.leapframework/leap-orm

public SequenceMapping(String name,DbSequence sequence){
Args.notEmpty(name,"sequence name");
Args.notNull(sequence,"sequence");
this.name = name;
this.sequence = sequence;
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public int[] batchDelete(EntityMapping em, List ids) {
Args.notNull(em,"entity mapping");
if(null == ids || ids.size() == 0){
return Arrays2.EMPTY_INT_ARRAY;
}
return doBatchDelete(em, ids.toArray());
}

代码示例来源:origin: org.leapframework/leap-orm

public DefaultCriteriaQuery(Dao dao, EntityMapping em, Class targetType) {
super(dao, targetType, em);
Args.notNull(em, "entity mapping");
this.builder = new SqlBuilder();
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public CreateEntityCommand cmdCreateEntity(Class entityClass) {
Args.notNull(entityClass,"entity class");
return commandFactory().newCreateEntityCommand(this, entityClass);
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public CreateTableCommand cmdCreateTable(EntityMapping em) {
Args.notNull(em, "entity mapping");
return commandFactory().newCreateTableCommand(this, em);
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public List findList(Class entityClass, Object[] ids) {
Args.notNull(entityClass,"entity class");
return findList(em(entityClass), entityClass, ids);
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public T find(String entityName, Class resultClass, Object id) throws EmptyRecordsException, TooManyRecordsException {
Args.notNull(entityName,"entity name");
Args.notNull(resultClass,"result class");
Args.notNull(id,"id");
return runInWrapperContext(em(entityName), (context)->{
return commandFactory().newFindCommand(context.getDao(),context.getEntityMapping(), id, resultClass, true).execute();
});
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public T findOrNull(String entityName, Class resultClass, Object id) throws EmptyRecordsException, TooManyRecordsException {
Args.notNull(entityName,"entity name");
Args.notNull(resultClass,"result class");
Args.notNull(id,"id");
return runInWrapperContext(em(entityName), (context)->{
return commandFactory().newFindCommand(context.getDao(),context.getEntityMapping(), id, resultClass, false).execute();
});
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public UpgradeSchemaCommand cmdUpgradeSchema(Class entityClass) throws EntityNotFoundException {
Args.notNull(entityClass,"entity class");
return commandFactory().newUpgradeSchemaCommand(this, em(entityClass));
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public boolean createTableIfNotExists(Class entityClass) {
Args.notNull(entityClass, "entity class");
return commandFactory().newCreateTableCommand(this, em(entityClass)).execute();
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public UpdateCommand cmdUpdate(EntityMapping em) throws MappingNotFoundException {
Args.notNull(em,"entity mapping");
return runInWrapperContext(em, (context)->{
return commandFactory().newUpdateCommand(context.getDao(),context.getEntityMapping());
});
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public void truncate(Class entityClass) {
Args.notNull(entityClass,"entity class");
EntityMapping em = em(entityClass);
Confirm.checkConfirmed("Dmo.truncate","may lost all the data in table '" + em.getTableName() + "'");
commandFactory().newTruncateEntityCommand(this, em).execute();
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public InsertCommand cmdInsert(Class entityClass) {
Args.notNull(entityClass,"entity class");
return runInWrapperContext(em(entityClass), (context)->{
return commandFactory().newInsertCommand(context.getDao(), context.getEntityMapping());
});
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public CriteriaQuery createCriteriaQuery(String entityName) {
Args.notNull(entityName, "entityName");
return runInWrapperContext(em(entityName), (context)->{
return queryFactory().createCriteriaQuery(context.getDao(),context.getEntityMapping(), Record.class);
});
}

代码示例来源:origin: org.leapframework/leap-orm

public int deleteAll(Class entityClass) {
Args.notNull(entityClass,"entity class");
EntityMapping em = em(entityClass);
return runInWrapperContext(em, (context)->{
return commandFactory().newDeleteAllCommand(context.getDao(),context.getEntityMapping()).execute();
});
}

代码示例来源:origin: org.leapframework/leap-orm

@Override
public int update(Object entity) throws MappingNotFoundException {
Args.notNull(entity,"entity");
EntityMapping em = emForObject(entity);
return runInWrapperContext(em, (context)->{
return commandFactory().newUpdateCommand(context.getDao(), context.getEntityMapping()).from(entity).execute();
});
}

推荐阅读
author-avatar
奋斗中DU_536
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有