当前位置: 首页>>代码示例>>Java>>正文


Java Variable类代码示例

本文整理汇总了Java中eu.atos.sla.datamodel.bean.Variable的典型用法代码示例。如果您正苦于以下问题:Java Variable类的具体用法?Java Variable怎么用?Java Variable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Variable类属于eu.atos.sla.datamodel.bean包,在下文中一共展示了Variable类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getByName

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public IVariable getByName(String name) {
	try {
		TypedQuery<IVariable> query = entityManager.createNamedQuery(
				Variable.QUERY_FIND_BY_NAME, IVariable.class);
		query.setParameter("name", name);
		IVariable variable = new Variable();

		variable = query.getSingleResult();
		

		return variable;

	} catch (NoResultException e) {
		logger.debug("No Result found: " + e);
		return null;
	}
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:19,代码来源:VariableDAOJpa.java

示例2: getAll

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public List<IVariable> getAll() {

	TypedQuery<IVariable> query = entityManager.createNamedQuery(
			Variable.QUERY_FIND_ALL, IVariable.class);
	List<IVariable> services = new ArrayList<IVariable>();
	services = query.getResultList();

	if (services != null) {
		logger.debug("Number of services:" + services.size());
	} else {
		logger.debug("No Result found.");
	}

	return services;
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:17,代码来源:VariableDAOJpa.java

示例3: getByName

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public IVariable getByName(String name) {
    try {
        TypedQuery<IVariable> query = entityManager.createNamedQuery(
                Variable.QUERY_FIND_BY_NAME, IVariable.class);
        query.setParameter("name", name);
        IVariable variable = new Variable();

        variable = query.getSingleResult();
        

        return variable;

    } catch (NoResultException e) {
        logger.debug("No Result found: " + e);
        return null;
    }
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:19,代码来源:VariableDAOJpa.java

示例4: getAll

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public List<IVariable> getAll() {

    TypedQuery<IVariable> query = entityManager.createNamedQuery(
            Variable.QUERY_FIND_ALL, IVariable.class);
    List<IVariable> services = new ArrayList<IVariable>();
    services = query.getResultList();

    if (services != null) {
        logger.debug("Number of services:" + services.size());
    } else {
        logger.debug("No Result found.");
    }

    return services;
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:17,代码来源:VariableDAOJpa.java

示例5: delete

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public boolean delete(IVariable variable) {
	try {
		variable = entityManager
				.getReference(Variable.class, variable.getId());
		entityManager.remove(variable);
		entityManager.flush();
		return true;
	} catch (EntityNotFoundException e) {
		logger.debug("Variable[{}] not found", variable.getId());
		return false;
	}
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:14,代码来源:VariableDAOJpa.java

示例6: delete

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public boolean delete(IVariable variable) {
    try {
        variable = entityManager
                .getReference(Variable.class, variable.getId());
        entityManager.remove(variable);
        entityManager.flush();
        return true;
    } catch (EntityNotFoundException e) {
        logger.debug("Variable[{}] not found", variable.getId());
        return false;
    }
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:14,代码来源:VariableDAOJpa.java

示例7: getById

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public Variable getById(Long id) {
	return entityManager.find(Variable.class, id);
}
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:5,代码来源:VariableDAOJpa.java

示例8: getById

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
@Override
public Variable getById(Long id) {
    return entityManager.find(Variable.class, id);
}
 
开发者ID:SeaCloudsEU,项目名称:SeaCloudsPlatform,代码行数:5,代码来源:VariableDAOJpa.java

示例9: getById

import eu.atos.sla.datamodel.bean.Variable; //导入依赖的package包/类
/**
 * Returns the variable from the database by its Id
 * 
 * @param id
 *            of the variable
 * @return the corresponding variable from the database
 */
public Variable getById(Long id);
 
开发者ID:Atos-FiwareOps,项目名称:sla-framework,代码行数:9,代码来源:IVariableDAO.java


注:本文中的eu.atos.sla.datamodel.bean.Variable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。